From 0284bd11c8062108f8cff85175341bc9823b8ab4 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 19 Oct 2010 17:20:31 +0200 Subject: QNAM HTTP: Also pause connection when emitting sslErrors() Pause the socket notifiers because the user could be displaying a dialog which makes the event loop run and could make our socket notifiers fire. Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234 --- src/network/access/qhttpnetworkconnectionchannel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index f83e7c1..d6b3f94 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -1035,7 +1035,11 @@ void QHttpNetworkConnectionChannel::_q_sslErrors(const QList &errors) if (!socket) return; //QNetworkReply::NetworkError errorCode = QNetworkReply::ProtocolFailure; + // Also pause the connection because socket notifiers may fire while an user + // dialog is displaying + connection->d_func()->pauseConnection(); emit connection->sslErrors(errors); + connection->d_func()->resumeConnection(); } void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes) -- cgit v0.12