summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-23 13:30:16 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-04-23 14:13:47 (GMT)
commit310496564dabe5f3038c64feff6f444074ee65b1 (patch)
tree760cb267101c59fa5672d42ea86b89cf03954e33 /src
parent08cc1ca928c197a0c94ff791da34e0a79eaed61b (diff)
downloadQt-310496564dabe5f3038c64feff6f444074ee65b1.zip
Qt-310496564dabe5f3038c64feff6f444074ee65b1.tar.gz
Qt-310496564dabe5f3038c64feff6f444074ee65b1.tar.bz2
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')
-rw-r--r--src/network/socket/qlocalsocket_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index e759d0b..39c9284 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()));
}