From: Jason A. Donenfeld Date: Mon, 2 Sep 2019 03:25:47 +0000 (-0600) Subject: wintun: consider abandoned mutexes as released X-Git-Tag: 0.0.20190908~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3dba4c1948e7225c61e8561abb50d0a876bd737;p=thirdparty%2Fwireguard-go.git wintun: consider abandoned mutexes as released --- 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") }