fix a goroutine leak issue caused by Login plugin timeout (#3547)

This commit is contained in:
fatedier
2023-07-25 15:12:40 +08:00
committed by GitHub
parent 3235addaaa
commit 6430afcfa5
3 changed files with 30 additions and 12 deletions

View File

@@ -552,7 +552,7 @@ func (svr *Service) RegisterControl(ctlConn net.Conn, loginMsg *msg.Login) (err
ctl := NewControl(ctx, svr.rc, svr.pxyManager, svr.pluginManager, svr.authVerifier, ctlConn, loginMsg, svr.cfg)
if oldCtl := svr.ctlManager.Add(loginMsg.RunID, ctl); oldCtl != nil {
oldCtl.allShutdown.WaitDone()
oldCtl.WaitClosed()
}
ctl.Start()