Add reconnect attempts in more cases in QHNCC.
Attempts on: - QAbstractSocket::ProxyConnectionTimeoutError - QAbstractSocket::ProxyConnectionClosedError (closed unexpectedly) Change-Id: I8e85288d724cb2f485f9e61d853dfaac5540032a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This commit is contained in:
parent
d6d9edd7c4
commit
e08aca15ec
@ -1171,6 +1171,22 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
|
||||
case QAbstractSocket::SslHandshakeFailedError:
|
||||
errorCode = QNetworkReply::SslHandshakeFailedError;
|
||||
break;
|
||||
case QAbstractSocket::ProxyConnectionClosedError:
|
||||
// try to reconnect/resend before sending an error.
|
||||
if (reconnectAttempts-- > 0) {
|
||||
closeAndResendCurrentRequest();
|
||||
return;
|
||||
}
|
||||
errorCode = QNetworkReply::ProxyConnectionClosedError;
|
||||
break;
|
||||
case QAbstractSocket::ProxyConnectionTimeoutError:
|
||||
// try to reconnect/resend before sending an error.
|
||||
if (reconnectAttempts-- > 0) {
|
||||
closeAndResendCurrentRequest();
|
||||
return;
|
||||
}
|
||||
errorCode = QNetworkReply::ProxyTimeoutError;
|
||||
break;
|
||||
default:
|
||||
// all other errors are treated as NetworkError
|
||||
errorCode = QNetworkReply::UnknownNetworkError;
|
||||
|
Loading…
Reference in New Issue
Block a user