mirror of
https://github.com/fatedier/frp.git
synced 2025-06-17 08:59:50 +00:00
fix misuse of unlock
phase, which needs protection, is still out of critical section
This commit is contained in:
parent
b4d5d8c756
commit
3507c17084
@ -254,8 +254,8 @@ func (pw *Wrapper) statusFailedCallback() {
|
|||||||
func (pw *Wrapper) InWorkConn(workConn net.Conn, m *msg.StartWorkConn) {
|
func (pw *Wrapper) InWorkConn(workConn net.Conn, m *msg.StartWorkConn) {
|
||||||
xl := pw.xl
|
xl := pw.xl
|
||||||
pw.mu.RLock()
|
pw.mu.RLock()
|
||||||
|
defer pw.mu.RUnlock()
|
||||||
pxy := pw.pxy
|
pxy := pw.pxy
|
||||||
pw.mu.RUnlock()
|
|
||||||
if pxy != nil && pw.Phase == ProxyPhaseRunning {
|
if pxy != nil && pw.Phase == ProxyPhaseRunning {
|
||||||
xl.Debugf("start a new work connection, localAddr: %s remoteAddr: %s", workConn.LocalAddr().String(), workConn.RemoteAddr().String())
|
xl.Debugf("start a new work connection, localAddr: %s remoteAddr: %s", workConn.LocalAddr().String(), workConn.RemoteAddr().String())
|
||||||
go pxy.InWorkConn(workConn, m)
|
go pxy.InWorkConn(workConn, m)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user