summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-10-19 15:20:31 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-10-27 12:40:27 (GMT)
commit0284bd11c8062108f8cff85175341bc9823b8ab4 (patch)
treedc41b10c72d08ca27da32f3717dde01af14b4991 /src/network/access
parenta8818493d4c782527dec7c30e9688d0e45a21351 (diff)
downloadQt-0284bd11c8062108f8cff85175341bc9823b8ab4.zip
Qt-0284bd11c8062108f8cff85175341bc9823b8ab4.tar.gz
Qt-0284bd11c8062108f8cff85175341bc9823b8ab4.tar.bz2
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
Diffstat (limited to 'src/network/access')
-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 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<QSslError> &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)