]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
wintun: consider abandoned mutexes as released
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 2 Sep 2019 03:25:47 +0000 (21:25 -0600)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 2 Sep 2019 03:25:47 +0000 (21:25 -0600)
tun/wintun/namespace_windows.go

index 21791efd6c74e75446d5d260bf89baec2949c22e..01fff91c562bee637bd614cb9f74b18e360ef7d8 100644 (file)
@@ -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")
        }