From 4c32b9de2c707beaf09178e0b7793efa3f585669 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 18 Aug 2010 12:02:25 -0400 Subject: [PATCH] Fix logic error in win32 TRY_LOCK that caused problems with rate-limiting --- evthread_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evthread_win32.c b/evthread_win32.c index 12b8c1e6..795f410f 100644 --- a/evthread_win32.c +++ b/evthread_win32.c @@ -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; -- 2.40.0