Преглед на файлове

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 години
родител
ревизия
75bc7d3153
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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