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

This commit is contained in:
Remember 2023-12-22 15:47:59 +08:00 committed by GitHub
parent 256b87321d
commit cdfa8fa66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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 {