097af6e135
The code previously used the old errors channel for checking, rather than the simpler boolean, which caused issues on shutdown, since the errors channel was meaningless. However, looking at this exposed a more basic problem: Close() and all the other functions that check the closed boolean can race. So protect with a basic RW lock, to ensure that Close() waits for all pending operations to complete. Reported-by: Joshua Sjoding <joshua.sjoding@scjalliance.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
netstack | ||
tuntest | ||
wintun | ||
operateonfd.go | ||
tun.go | ||
tun_darwin.go | ||
tun_freebsd.go | ||
tun_linux.go | ||
tun_openbsd.go | ||
tun_windows.go |