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.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 0eadc93..2fd52fe 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -1142,10 +1142,13 @@ void QWebSocketPrivate::processData()
{
Q_ASSERT(m_pSocket);
while (m_pSocket->bytesAvailable()) {
- if (state() == QAbstractSocket::ConnectingState)
+ if (state() == QAbstractSocket::ConnectingState) {
+ if (!m_pSocket->canReadLine())
+ break;
processHandshake(m_pSocket);
- else
+ } else {
m_dataProcessor.process(m_pSocket);
+ }
}
}