summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@qt.io>2022-01-24 15:25:46 +0200
committerJoni Poikelin <joni.poikelin@qt.io>2022-02-01 14:48:58 +0200
commite1c92b57485e685bac6884cca43e152faf9d2d2b (patch)
treeb00a74bdf3c38c43e2e5f894d84a5b3adc57941a /src
parent859ba3cf28e6ee9177c1c5dce2984da25195ab64 (diff)
downloadqtwebsockets-e1c92b57485e685bac6884cca43e152faf9d2d2b.tar.gz
Fix order of signals around disconnection
readyRead() signal had been connected with QueuedConnection which caused disconnected() signal to sometimes come before last message signals of a connection. Reasoning for this was some issue regarding SSL sockets, but there is a good chance it has been fixed since then. Removing this doesn't seem to cause hangs now at least. Fixes: QTBUG-100054 Pick-to: 6.3 6.2 Change-Id: Id465916d111a5520f4039cf57f822918f3afbca0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsocket_p.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index ef9b247..b0c3e4e 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -621,10 +621,8 @@ void QWebSocketPrivate::makeConnections(QTcpSocket *pTcpSocket)
//catch signals
QObjectPrivate::connect(pTcpSocket, &QAbstractSocket::stateChanged, this,
&QWebSocketPrivate::processStateChanged);
- //!!!important to use a QueuedConnection here;
- //with QTcpSocket there is no problem, but with QSslSocket the processing hangs
QObjectPrivate::connect(pTcpSocket, &QAbstractSocket::readyRead, this,
- &QWebSocketPrivate::processData, Qt::QueuedConnection);
+ &QWebSocketPrivate::processData);
#ifndef QT_NO_SSL
const QSslSocket * const sslSocket = qobject_cast<const QSslSocket *>(pTcpSocket);
if (sslSocket) {