diff options
author | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2016-03-08 12:36:14 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-05-23 10:55:00 +0000 |
commit | 932cce18f72d9af99629f1bad8bd1b6114de0300 (patch) | |
tree | e9e37729a9cc3b2613937beff8bed988c3b33699 /src/network/socket/qsocks5socketengine.cpp | |
parent | 5f02feae05a63dbd447e491b7518b1ed45c8b711 (diff) |
QSocks5SocketEngine: connect after auth fail as if connecting afresh.
If the client has responded to an earlier auth fail sensibly, further
use of the socks connection probably means we have fresh credentials.
So treat AuthenticatingError like Uninitialized. This makes
tst_QNetworkReply::authenticationCacheAfterCancel(*+socksauth) work
again.
Task-number: QTBUG-51545
Change-Id: I237ca5a3194b093cc6480dd33aa7709b7b584941
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/network/socket/qsocks5socketengine.cpp')
-rw-r--r-- | src/network/socket/qsocks5socketengine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index 6868e8c73a..c0398a8105 100644 --- a/src/network/socket/qsocks5socketengine.cpp +++ b/src/network/socket/qsocks5socketengine.cpp @@ -1112,7 +1112,9 @@ bool QSocks5SocketEngine::connectInternal() } if (d->socketState != QAbstractSocket::ConnectingState) { - if (d->socks5State == QSocks5SocketEnginePrivate::Uninitialized) { + if (d->socks5State == QSocks5SocketEnginePrivate::Uninitialized + // We may have new auth credentials since an earlier failure: + || d->socks5State == QSocks5SocketEnginePrivate::AuthenticatingError) { setState(QAbstractSocket::ConnectingState); //limit buffer in internal socket, data is buffered in the external socket under application control d->data->controlSocket->setReadBufferSize(65536); |