summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-06-14 17:15:21 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-06-14 17:15:21 (GMT)
commitfd96a8180a5ccfeaea5b081c42137d18d640c25e (patch)
tree573247867de97e7a163735a48791c1681b22c333 /src/network
parent78e74249014b152b93dae07bf194b16769016ad0 (diff)
downloadQt-fd96a8180a5ccfeaea5b081c42137d18d640c25e.zip
Qt-fd96a8180a5ccfeaea5b081c42137d18d640c25e.tar.gz
Qt-fd96a8180a5ccfeaea5b081c42137d18d640c25e.tar.bz2
QLocalSocket/Win: call close on async connection loss
If we notice a broken pipe via _q_notified, we should call close in case the internal read buffer is empty. Auto test added: tst_QLocalSocket::asyncDisconnectNotify Reviewed-by: ossi
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qlocalsocket_win.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 2223ebe..01cbd4b 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -485,6 +485,8 @@ void QLocalSocketPrivate::_q_notified()
if (!completeAsyncRead()) {
pipeClosed = true;
emit q->readChannelFinished();
+ if (actualReadBufferSize == 0)
+ QTimer::singleShot(0, q, SLOT(_q_pipeClosed()));
return;
}
startAsyncRead();