summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-09-24 14:01:45 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2015-11-18 14:14:36 +0000
commit7a8c61284738ecaf6632611d638f24cc7c3b37bd (patch)
tree8627faca469b0e58cdb5fa7a4b6eb6122559a481
parent6f8a19846ba51966f524a7b9eb2c4a2b118f4b47 (diff)
QNAM: clean the channel request data on server disconnect
Otherwise, we have unexpected channel close initiated by reply destructor. Change-Id: I15ad076ff20546e78787e19155544a2e5f8047a1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index b4eda3477e..f591abc28b 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -254,6 +254,10 @@ void QHttpNetworkConnectionChannel::handleUnexpectedEOF()
close();
reply->d_func()->errorString = connection->d_func()->errorDetail(QNetworkReply::RemoteHostClosedError, socket);
emit reply->finishedWithError(QNetworkReply::RemoteHostClosedError, reply->d_func()->errorString);
+ reply = 0;
+ if (protocolHandler)
+ protocolHandler->setReply(0);
+ request = QHttpNetworkRequest();
QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection);
} else {
reconnectAttempts--;