moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.09k stars 182 forks source link

go: allow concurrent Write calls #621

Closed djs55 closed 1 year ago

djs55 commented 1 year ago

The net.Conn interface says:

// 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