summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qlocalsocket_win.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 93e0958..d6e70be 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -200,7 +200,10 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize)
}
if (d->pipeClosed) {
- QTimer::singleShot(0, this, SLOT(_q_pipeClosed()));
+ if (readSoFar == 0) {
+ QTimer::singleShot(0, this, SLOT(_q_pipeClosed()));
+ return -1; // signal EOF
+ }
} else {
if (!d->readSequenceStarted)
d->startAsyncRead();