summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-10-11 15:42:27 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-11 15:42:27 +0200
commitcd26439ac7ca1a444e9b5534a504afb0bb411890 (patch)
treee6901020de599f4764e3120bb7172ba528f1d0a8 /src/websockets/qwebsocket_p.cpp
parent5775c5e344e94f47af73d0d72a631375fb10d3d5 (diff)
parentb05ec56db6f17f04387af72b8e1b9a64b1092daa (diff)
downloadqtwebsockets-cd26439ac7ca1a444e9b5534a504afb0bb411890.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3v5.10.0-beta2
Conflicts: .qmake.conf Change-Id: I4af142703e469b56236b73335a93f6960534c0f1
Diffstat (limited to 'src/websockets/qwebsocket_p.cpp')
-rw-r--r--src/websockets/qwebsocket_p.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 2e19d3d..6abffdc 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -633,7 +633,7 @@ void QWebSocketPrivate::makeConnections(const QTcpSocket *pTcpSocket)
void QWebSocketPrivate::releaseConnections(const QTcpSocket *pTcpSocket)
{
if (Q_LIKELY(pTcpSocket))
- pTcpSocket->disconnect(pTcpSocket);
+ pTcpSocket->disconnect();
m_dataProcessor.disconnect();
}
@@ -1145,7 +1145,8 @@ void QWebSocketPrivate::socketDestroyed(QObject *socket)
*/
void QWebSocketPrivate::processData()
{
- Q_ASSERT(m_pSocket);
+ if (!m_pSocket) // disconnected with data still in-bound
+ return;
while (m_pSocket->bytesAvailable()) {
if (state() == QAbstractSocket::ConnectingState) {
if (!m_pSocket->canReadLine())