From cdfa8fa66ffc59a5f3e13ee48c7ac13ef90c9ef2 Mon Sep 17 00:00:00 2001 From: Remember <36129334+wuqinqiang@users.noreply.github.com> Date: Fri, 22 Dec 2023 15:47:59 +0800 Subject: [PATCH] fix(client): close workConn when authentication err (#3885) --- client/control.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client/control.go b/client/control.go index edfc726c..b272ee06 100644 --- a/client/control.go +++ b/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 {