aboutsummaryrefslogtreecommitdiffstats
path: root/src/websockets/qwebsocket_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocket_p.cpp')
-rw-r--r--src/websockets/qwebsocket_p.cpp3
1 files changed, 2 insertions, 1 deletions
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