From 66d24bb69228ef264de51c8306785780874ebdc3 Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Tue, 3 Nov 2020 10:01:13 -0800 Subject: Release mutex before blocking during TCP handshake route resolution. Without releasing the mutex, operations on the endpoint following a nonblocking connect will not make progress until connect is complete. PiperOrigin-RevId: 340467654 --- pkg/tcpip/transport/tcp/connect.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/tcpip/transport/tcp') diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index fe4bc56f5..f5f7be195 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -496,7 +496,9 @@ func (h *handshake) resolveRoute() *tcpip.Error { } // Wait for notification. + h.ep.mu.Unlock() index, _ = s.Fetch(true /* block */) + h.ep.mu.Lock() } } -- cgit v1.2.3