moby / vpnkit

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

go: libproxy: don't hold the metadata mutex while writing #616

Closed djs55 closed 1 year ago

djs55 commented 1 year ago

The sendWindowUpdate function acquires the writeMutex and writes to the channel. Since Accept() holds the metadataMutex, this prevents processing other connections.

In all other places we carefully drop the metadata mutex before writing. Accept was an oversight.

Signed-off-by: David Scott dave@recoil.org