Wait for the event to be signaled, even if we already have waited this seems to do the trick. See #93 and #94

This commit is contained in:
Micke Prag 2011-10-07 07:57:55 +00:00
parent 9535ecd0ae
commit ffeb0b79d4

View file

@ -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);