diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/websockets/qwebsocket.cpp | 3 | ||||
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/websockets/qwebsocket.cpp b/src/websockets/qwebsocket.cpp index 39998cc..b500853 100644 --- a/src/websockets/qwebsocket.cpp +++ b/src/websockets/qwebsocket.cpp @@ -678,7 +678,8 @@ void QWebSocket::setReadBufferSize(qint64 size) } /*! - Returns true if the QWebSocket is valid. + Returns \c true if the socket is ready for reading and writing; otherwise + returns \c false. */ bool QWebSocket::isValid() const { diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index f0eae30..91588c0 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -1225,7 +1225,8 @@ void QWebSocketPrivate::setReadBufferSize(qint64 size) */ bool QWebSocketPrivate::isValid() const { - return (m_pSocket && m_pSocket->isValid()); + return (m_pSocket && m_pSocket->isValid() && + (m_socketState == QAbstractSocket::ConnectedState)); } QT_END_NAMESPACE |