moby / vpnkit

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

go: don't hold the metadata mutex and then acquire the channel mutex #626

Closed djs55 closed 1 year ago

djs55 commented 1 year ago

Close() holds the channel mutex then calls decrChannelRef which acquires the metadata mutex.

In DumpState() we should not hold the metadata mutex and then acquire the channel mutex.