summaryrefslogtreecommitdiff
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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 8cd7375..be8cb88 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -981,7 +981,7 @@ void QWebSocketPrivate::processHandshake(QTcpSocket *pSocket)
}
if (m_handshakeState != ParsingHeaderState) {
- if (pSocket->atEnd()) {
+ if (pSocket->state() != QAbstractSocket::ConnectedState) {
errorDescription = QWebSocket::tr("QWebSocketPrivate::processHandshake: Connection closed while reading header.");
break;
}