Browse Source

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.
jp9000 10 years ago
parent
commit
75bc7d3153
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/win-wasapi/win-wasapi.cpp

+ 1 - 1
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