From 75bc7d3153125fbd2146b9c7d2ef7e667c93afa9 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 9 Apr 2015 08:49:38 -0700 Subject: [PATCH] win-wasapi: Fix timeout bug The WaitForSignal message is supposed to return return true if the handle was signaled, not if the wait timed out. --- plugins/win-wasapi/win-wasapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/win-wasapi/win-wasapi.cpp b/plugins/win-wasapi/win-wasapi.cpp index 4cdb366b0..568d8ab2e 100644 --- a/plugins/win-wasapi/win-wasapi.cpp +++ b/plugins/win-wasapi/win-wasapi.cpp @@ -309,7 +309,7 @@ void WASAPISource::Reconnect() static inline bool WaitForSignal(HANDLE handle, DWORD time) { - return WaitForSingleObject(handle, time) == WAIT_TIMEOUT; + return WaitForSingleObject(handle, time) != WAIT_TIMEOUT; } #define RECONNECT_INTERVAL 3000