diff options
author | Joni Poikelin <joni.poikelin@qt.io> | 2022-01-24 15:25:46 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-01 16:01:02 +0000 |
commit | 8bec50aeb7f0ef38652b312ea51e971ecb7c5cb9 (patch) | |
tree | a9f242d26e84e0c77c3697820494fd8f44685df7 | |
parent | 8c4a0952318d224093ea518dba46b59037ffb3b6 (diff) |
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
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>
(cherry picked from commit e1c92b57485e685bac6884cca43e152faf9d2d2b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/websockets/qwebsocket_p.cpp | 4 |
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) { |