From f6911e21eabb0284b9e2bb7fe04958faf148a6b1 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 26 Feb 2023 11:18:01 +0800 Subject: [PATCH] fix: ensure peekMutex is locked before handleSocket --- tunnel/tunnel.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 11458d38..c52400e8 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -469,6 +469,8 @@ func handleTCPConn(connCtx C.ConnContext) { ) } + peekMutex.Lock() + defer peekMutex.Unlock() handleSocket(connCtx, remoteConn) }