diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-02-16 17:18:01 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-02-16 17:18:01 (GMT) |
commit | 9e5e97f3b5eaa9cda471be44a5c59b51561393b6 (patch) | |
tree | 2f1dde685870d523ffa635837412e52543224599 | |
parent | c09ef77cd271c47cb3c2607553dab669d6cbcddc (diff) | |
download | Qt-9e5e97f3b5eaa9cda471be44a5c59b51561393b6.zip Qt-9e5e97f3b5eaa9cda471be44a5c59b51561393b6.tar.gz Qt-9e5e97f3b5eaa9cda471be44a5c59b51561393b6.tar.bz2 |
QLocalSocket::isValid on Windows must check for broken connection
Reviewed-by: ossi
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 7a1e84b..3283bf2 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -537,7 +537,10 @@ bool QLocalSocket::waitForDisconnected(int msecs) bool QLocalSocket::isValid() const { Q_D(const QLocalSocket); - return (d->handle != INVALID_HANDLE_VALUE); + if (d->handle == INVALID_HANDLE_VALUE) + return false; + + return PeekNamedPipe(d->handle, NULL, 0, NULL, NULL, NULL); } bool QLocalSocket::waitForReadyRead(int msecs) |