summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2019-08-27 10:00:54 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2019-08-28 13:03:48 +0200
commit187d767f10a4319db2f442dfed080bbcbaccaa27 (patch)
treea4146e6cf5b242fc354136c8cba827fabf546854
parent470a1cb4e43d410cb0d05286b286f491c85ffd29 (diff)
downloadqtwebsockets-187d767f10a4319db2f442dfed080bbcbaccaa27.tar.gz
Take 2: Properly handle multiple websocket frames in one TCP frame
Gerrit ate my change and somehow created an impossible state where a patch was able to merge due to its fix but couldn't actually pass its tests. Amends 6e1fa958c289de639753a60a9384bd94db0e91a8 Task-number: QTBUG-77830 Change-Id: Iedc23616816bb2c1758969a1d76b9536b509c38a Reviewed-by: Ryan Chu <ryan.chu@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
-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 9dd83dd..36aefd9 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -1175,7 +1175,7 @@ void QWebSocketPrivate::processData()
{
if (!m_pSocket) // disconnected with data still in-bound
return;
- if (m_pSocket->bytesAvailable()) {
+ while (m_pSocket->bytesAvailable()) {
if (state() == QAbstractSocket::ConnectingState) {
if (!m_pSocket->canReadLine())
return;