mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 20:07:56 -04:00
Fix logic error in win32 TRY_LOCK that caused problems with rate-limiting
This commit is contained in:
parent
d0b884338f
commit
4c32b9de2c
@ -67,7 +67,7 @@ evthread_win32_lock(unsigned mode, void *_lock)
|
||||
{
|
||||
CRITICAL_SECTION *lock = _lock;
|
||||
if ((mode & EVTHREAD_TRY)) {
|
||||
return TryEnterCriticalSection(lock) != 0;
|
||||
return ! TryEnterCriticalSection(lock);
|
||||
} else {
|
||||
EnterCriticalSection(lock);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user