From bcf5ea28c19102430f0dc879e8efb2d895dcea3c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 27 Feb 2014 12:17:12 +0100 Subject: [PATCH] Remove deleted QNetworkReplies from SPDY queues We already remove QNetworkReply from most queues, but we also need to remove it from the SPDY queue. Otherwise we might end up trying to send an already deleted message. Change-Id: Ib39bf8f26315b66179755a6f66dbd657576cbbe3 Reviewed-by: Peter Hartmann --- src/network/access/qhttpnetworkconnection.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 6d568220e2c..87511076d3d 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -864,6 +864,19 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply) return; } } +#ifndef QT_NO_SSL + // is the reply inside the SPDY pipeline of this channel already? + QMultiMap::iterator it = channels[i].spdyRequestsToSend.begin(); + QMultiMap::iterator end = channels[i].spdyRequestsToSend.end(); + for (; it != end; ++it) { + if (it.value().second == reply) { + channels[i].spdyRequestsToSend.remove(it.key()); + + QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); + return; + } + } +#endif } // remove from the high priority queue if (!highPriorityQueue.isEmpty()) {