wintun: consider abandoned mutexes as released
This commit is contained in:
parent
7937840f96
commit
f3dba4c194
|
@ -91,7 +91,7 @@ func (pool Pool) takeNameMutex() (windows.Handle, error) {
|
||||||
windows.CloseHandle(mutex)
|
windows.CloseHandle(mutex)
|
||||||
return 0, fmt.Errorf("Error waiting on name mutex: %v", err)
|
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)
|
windows.CloseHandle(mutex)
|
||||||
return 0, errors.New("Error with event trigger of name mutex")
|
return 0, errors.New("Error with event trigger of name mutex")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue