wintun: consider abandoned mutexes as released

This commit is contained in:
Jason A. Donenfeld 2019-09-01 21:25:47 -06:00
parent 7937840f96
commit f3dba4c194

View 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")
}