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
This commit is contained in:
Dean Deng
2020-11-03 10:03:30 -08:00
committed by gVisor bot
parent 0e96f8065e
commit 66d24bb692
+2
View File
@@ -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()
}
}