diff --git a/src/base/system.c b/src/base/system.c index 1c4d3a484..f4ce8b37b 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -477,7 +477,7 @@ int lock_try(LOCK lock) #if defined(CONF_FAMILY_UNIX) return pthread_mutex_trylock((LOCKINTERNAL *)lock); #elif defined(CONF_FAMILY_WINDOWS) - return TryEnterCriticalSection((LPCRITICAL_SECTION)lock); + return !TryEnterCriticalSection((LPCRITICAL_SECTION)lock); #else #error not implemented on this platform #endif