diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-06-14 17:15:21 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-06-14 17:15:21 (GMT) |
commit | fd96a8180a5ccfeaea5b081c42137d18d640c25e (patch) | |
tree | 573247867de97e7a163735a48791c1681b22c333 /src | |
parent | 78e74249014b152b93dae07bf194b16769016ad0 (diff) | |
download | Qt-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')
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 2 |
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(); |