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 <phartmann@blackberry.com>
This commit is contained in:
Allan Sandfeld Jensen 2014-02-27 12:17:12 +01:00 committed by The Qt Project
parent e7f685002b
commit bcf5ea28c1

View File

@ -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<int, HttpMessagePair>::iterator it = channels[i].spdyRequestsToSend.begin();
QMultiMap<int, HttpMessagePair>::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()) {