// Multiple goroutines may invoke methods on a Conn simultaneously.
Previously concurrent calls to Write() would block for window space but only one would be woken up by a Signal() when a window update is received, allowing the other call to block forever.
The handling of write timeouts was also confusing because
time.Sleep couldn't be interrupted
the condition variable Wait() was on a temporary goroutine
The net.Conn interface says:
Previously concurrent calls to
Write()
would block for window space but only one would be woken up by aSignal()
when a window update is received, allowing the other call to block forever.The handling of write timeouts was also confusing because
time.Sleep
couldn't be interruptedWait()
was on a temporary goroutine