Compare commits

...

2 Commits

Author SHA1 Message Date
bobo liu
6121c81c4a
Merge 3507c17084642ffc3dabc04acc03b7c32b1a6f73 into 69cc422edf695a7f1f524e427fa175aee79ac3e3 2024-07-25 20:05:09 +08:00
bobo liu
3507c17084 fix misuse of unlock
phase, which needs protection, is still out of critical section
2024-07-10 21:43:08 +08:00

View File

@ -254,8 +254,8 @@ func (pw *Wrapper) statusFailedCallback() {
func (pw *Wrapper) InWorkConn(workConn net.Conn, m *msg.StartWorkConn) {
xl := pw.xl
pw.mu.RLock()
defer pw.mu.RUnlock()
pxy := pw.pxy
pw.mu.RUnlock()
if pxy != nil && pw.Phase == ProxyPhaseRunning {
xl.Debugf("start a new work connection, localAddr: %s remoteAddr: %s", workConn.LocalAddr().String(), workConn.RemoteAddr().String())
go pxy.InWorkConn(workConn, m)