From 7e846ce307b804ffd1a38ea1c1e1ca8f54624fa9 Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Sat, 16 Dec 2023 21:08:26 -0600 Subject: [PATCH] Dont hold a read lock on the main hostmap when starting a handshake --- handshake_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handshake_manager.go b/handshake_manager.go index 00321d67a..1130f5e18 100644 --- a/handshake_manager.go +++ b/handshake_manager.go @@ -367,7 +367,7 @@ func (hm *HandshakeManager) GetOrHandshake(vpnIp iputil.VpnIp, cacheCb func(*Han return h, true } - defer hm.mainHostMap.RUnlock() + hm.mainHostMap.RUnlock() return hm.StartHandshake(vpnIp, cacheCb), false }