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>
This commit is contained in:
parent
5f02feae05
commit
932cce18f7
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user