summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-01 21:25:47 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-01 21:25:47 -0600
commitf3dba4c1948e7225c61e8561abb50d0a876bd737 (patch)
tree07c28447de0724d2e2f83e62979d1d95eb64198d /tun
parent7937840f9631fbaaab33bdbad67040b28f5d0387 (diff)
wintun: consider abandoned mutexes as released
Diffstat (limited to 'tun')
-rw-r--r--tun/wintun/namespace_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/wintun/namespace_windows.go b/tun/wintun/namespace_windows.go
index 21791ef..01fff91 100644
--- a/tun/wintun/namespace_windows.go
+++ b/tun/wintun/namespace_windows.go
@@ -91,7 +91,7 @@ func (pool Pool) takeNameMutex() (windows.Handle, error) {
windows.CloseHandle(mutex)
return 0, fmt.Errorf("Error waiting on name mutex: %v", err)
}
- if event != windows.WAIT_OBJECT_0 {
+ if event != windows.WAIT_OBJECT_0 && event != windows.WAIT_ABANDONED {
windows.CloseHandle(mutex)
return 0, errors.New("Error with event trigger of name mutex")
}