summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-26 22:22:45 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-26 22:22:45 -0400
commit097af6e1351ba80a18b8f63e9c07b9bd13b632bb (patch)
tree71053b525918fdf2fcde1793bb9e5986260050a9 /README.md
parent8246d251ea9b9cbef07082bd69280a8f988cec0c (diff)
tun: windows: protect reads from closing
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>
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions