internal/servers/worker: actually return when aborting closeConnections (#1371)

This adds a return when aborting from closeConnections, which should
have happened as a part of #1369.

Note that it's currently inconsequential that it's not happening right
now, save some misleading log entries. setCloseTimeForResponse will
effectively no-op on empty or nil input maps.
build-0b66464a3a173d5cd28a41924fb661d9e68b33c5-7706fefd870195c1
Chris Marchesi 5 years ago committed by GitHub
parent 48e55f156a
commit 77bafcab71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -296,7 +296,8 @@ func (w *Worker) closeConnections(ctx context.Context, closeInfo map[string]stri
if err != nil {
w.logger.Error(err.Error())
w.logger.Error("serious error in processing return data from controller, aborting marking connections as closed")
w.logger.Error("serious error in processing return data from controller, aborting additional session/connection state modification")
return
}
// Mark connections as closed

@ -79,7 +79,7 @@ func TestMakeFakeSessionCloseInfo(t *testing.T) {
require.Equal(expected, actual)
}
func TestMakeFakeSessionCloseInfoPanicIfCloseInfoNil(t *testing.T) {
func TestMakeFakeSessionCloseInfoErrorIfCloseInfoNil(t *testing.T) {
require := require.New(t)
actual, err := new(Worker).makeFakeSessionCloseInfo(nil)
require.Nil(actual)

Loading…
Cancel
Save