diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-09-10 15:46:11 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-09-10 15:50:39 (GMT) |
commit | 04c518e7629945a48e7e8e9216229cc879055ff4 (patch) | |
tree | f6d5ecc7e33ed63820d29a1e8976da1707a89ed6 /src/network | |
parent | 864520a0323fe56b290577befafd15b140433788 (diff) | |
download | Qt-04c518e7629945a48e7e8e9216229cc879055ff4.zip Qt-04c518e7629945a48e7e8e9216229cc879055ff4.tar.gz Qt-04c518e7629945a48e7e8e9216229cc879055ff4.tar.bz2 |
QLocalSocket Windows: emit readChannelFinished if broken pipe detected
If we detect in a read operation that the pipe has been closed,
we must emit the readChannelFinished signal.
Reviewed-by: ossi
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index ea85a62..93e0958 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -265,6 +265,8 @@ void QLocalSocketPrivate::startAsyncRead() // It may happen, that the other side closes the connection directly // after writing data. Then we must set the appropriate socket state. pipeClosed = true; + Q_Q(QLocalSocket); + emit q->readChannelFinished(); return; } default: @@ -326,6 +328,7 @@ DWORD QLocalSocketPrivate::bytesAvailable() } else { if (!pipeClosed) { pipeClosed = true; + emit q->readChannelFinished(); QTimer::singleShot(0, q, SLOT(_q_pipeClosed())); } } @@ -448,6 +451,7 @@ void QLocalSocketPrivate::_q_notified() Q_Q(QLocalSocket); if (!completeAsyncRead()) { pipeClosed = true; + emit q->readChannelFinished(); return; } startAsyncRead(); |