fix: synchronize service startup and shutdown (#5560)

This commit is contained in:
fatedier
2026-10-09 12:27:12 +08:00
committed by GitHub
parent 4cd4747525
commit 55107d003d
6 changed files with 485 additions and 14 deletions
+2 -1
View File
@@ -267,8 +267,9 @@ func (pw *Wrapper) InWorkConn(workConn net.Conn, m *msg.StartWorkConn) {
xl := pw.xl
pw.mu.RLock()
pxy := pw.pxy
running := pw.Phase == ProxyPhaseRunning
pw.mu.RUnlock()
if pxy != nil && pw.Phase == ProxyPhaseRunning {
if pxy != nil && running {
xl.Debugf("start a new work connection, localAddr: %s remoteAddr: %s", workConn.LocalAddr().String(), workConn.RemoteAddr().String())
go pxy.InWorkConn(workConn, m)
} else {