diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-04-23 15:30:16 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-04-23 16:13:47 +0200 |
commit | 310496564dabe5f3038c64feff6f444074ee65b1 (patch) | |
tree | 760cb267101c59fa5672d42ea86b89cf03954e33 /src/network | |
parent | 08cc1ca928c197a0c94ff791da34e0a79eaed61b (diff) |
correctly handle remote disconnects
about the only error case for a PeekNamedPipe() which does not actually
want to read anything is some kind of disconnect. so ignore the error
code and just handle the error as a close.
Task-number: 247144
Reviewed-by: thiago
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index e759d0bd1b..39c92842f3 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -298,7 +298,7 @@ qint64 QLocalSocketPrivate::bytesAvailable() if (PeekNamedPipe(handle, NULL, 0, NULL, &bytes, NULL)) { return bytes; } else { - if (ERROR_BROKEN_PIPE == GetLastError() && !pipeClosed) { + if (!pipeClosed) { pipeClosed = true; QTimer::singleShot(0, q, SLOT(_q_pipeClosed())); } |