summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Marley <michael@michaelmarley.com>2015-01-12 21:59:43 -0500
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-01-19 08:16:24 +0100
commit128cab4635c3ea42af5d3b9952f7b7e1d89284e7 (patch)
treedc54f8db6fe06ad22eec6241391e5a562b90673a
parent3c21c4581dbd957d9f660dd52d0298ecef1001cb (diff)
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>
-rw-r--r--src/network/ssl/qsslsocket.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 31c7b3087e..0f7c376e04 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -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