diff options
Diffstat (limited to 'src/network')
-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) |