Set pendingClose to false on init in QSslSocket

Fixes an issue where under certain circumstances, QSslSocket could get
stuck in a state where it would disconnect immediately after starting
encryption.  Since it doesn't make any sense for the socket to be
initialized to a state where any connection attempt will fail, the
pendingClose value should be set to false.

Thanks to Martin Sandsmark for his help debugging this issue.

Task-number: QTBUG-43793
Change-Id: I7deebacbac588c21439a8e594db4222095cf3f22
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Michael Marley 2015-01-12 21:59:43 -05:00 committed by Jani Heikkinen
parent 3c21c4581d
commit 128cab4635

View File

@ -1982,6 +1982,7 @@ void QSslSocketPrivate::init()
connectionEncrypted = false;
ignoreAllSslErrors = false;
shutdown = false;
pendingClose = false;
// we don't want to clear the ignoreErrorsList, so
// that it is possible setting it before connecting