mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Unlock tcp endpoint mutex before blocking forever.
This was occasionally causing tests to get stuck due to races with the save process, during which the same mutex is acquired. PiperOrigin-RevId: 340789616
This commit is contained in:
@@ -1370,7 +1370,9 @@ func (e *endpoint) protocolMainLoop(handshake bool, wakerInitDone chan<- struct{
|
||||
drained := e.drainDone != nil
|
||||
if drained {
|
||||
close(e.drainDone)
|
||||
e.mu.Unlock()
|
||||
<-e.undrain
|
||||
e.mu.Lock()
|
||||
}
|
||||
|
||||
// Set up the functions that will be called when the main protocol loop
|
||||
|
||||
Reference in New Issue
Block a user