summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 5726925cb0..d5f63af745 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -966,7 +966,10 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
} else if (state != QHttpNetworkConnectionChannel::IdleState && state != QHttpNetworkConnectionChannel::ReadingState) {
// Try to reconnect/resend before sending an error.
// While "Reading" the _q_disconnected() will handle this.
- if (reconnectAttempts-- > 0) {
+ // If we're using ssl then the protocolHandler is not initialized until
+ // "encrypted" has been emitted, since retrying requires the protocolHandler (asserted)
+ // we will not try if encryption is not done.
+ if (!pendingEncrypt && reconnectAttempts-- > 0) {
resendCurrentRequest();
return;
} else {