summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-02-16 17:18:01 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-02-16 17:18:01 (GMT)
commit9e5e97f3b5eaa9cda471be44a5c59b51561393b6 (patch)
tree2f1dde685870d523ffa635837412e52543224599
parentc09ef77cd271c47cb3c2607553dab669d6cbcddc (diff)
downloadQt-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.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 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)