QSocks5SocketEngine: use QSignalBlocker

Change-Id: Ib30daf8d716401cf3e2c562dc3ab7924b026189d
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Marc Mutz 2013-10-26 11:04:52 +02:00 committed by The Qt Project
parent 05345f2a55
commit 4fb04b0bd7

View File

@ -735,9 +735,10 @@ void QSocks5SocketEnginePrivate::reauthenticate()
proxyInfo.setPassword(auth.password());
data->authenticator = new QSocks5PasswordAuthenticator(proxyInfo.user(), proxyInfo.password());
data->controlSocket->blockSignals(true);
data->controlSocket->abort();
data->controlSocket->blockSignals(false);
{
const QSignalBlocker blocker(data->controlSocket);
data->controlSocket->abort();
}
data->controlSocket->connectToHost(proxyInfo.hostName(), proxyInfo.port());
} else {
// authentication failure