Browse Source

fix(client): close workConn when authentication err (#3885)

Remember 1 year ago
parent
commit
cdfa8fa66f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      client/control.go

+ 1 - 0
client/control.go

@@ -133,6 +133,7 @@ func (ctl *Control) handleReqWorkConn(_ msg.Message) {
 	}
 	if err = ctl.sessionCtx.AuthSetter.SetNewWorkConn(m); err != nil {
 		xl.Warn("error during NewWorkConn authentication: %v", err)
+		workConn.Close()
 		return
 	}
 	if err = msg.WriteMsg(workConn, m); err != nil {