From ffeb0b79d45b3af9e627f1aa155b6b3de4d917fa Mon Sep 17 00:00:00 2001 From: Micke Prag Date: Fri, 7 Oct 2011 07:57:55 +0000 Subject: [PATCH] Wait for the event to be signaled, even if we already have waited this seems to do the trick. See #93 and #94 --- telldus-core/common/Socket_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telldus-core/common/Socket_win.cpp b/telldus-core/common/Socket_win.cpp index 023b5e94..f78b274d 100644 --- a/telldus-core/common/Socket_win.cpp +++ b/telldus-core/common/Socket_win.cpp @@ -145,7 +145,7 @@ void Socket::write(const std::wstring &msg){ d->connected = false; return; } - fSuccess = GetOverlappedResult(d->hPipe, &oOverlap, &bytesWritten, false); + fSuccess = GetOverlappedResult(d->hPipe, &oOverlap, &bytesWritten, TRUE); CloseHandle(writeEvent); if (!fSuccess) { CancelIo(d->hPipe);