summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-05-16 11:20:25 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:25:11 (GMT)
commitc81cf5590d24ef002716cc6c85051afc13db75e2 (patch)
treef6fef657b14e39d652f9660716d48a4768c0fb4e /src/network
parentf26e9750d7dd03b445389063b4fd417a7a32684d (diff)
downloadQt-c81cf5590d24ef002716cc6c85051afc13db75e2.zip
Qt-c81cf5590d24ef002716cc6c85051afc13db75e2.tar.gz
Qt-c81cf5590d24ef002716cc6c85051afc13db75e2.tar.bz2
Fix regression that caused waitForXXX(-1) to fail.
Regression was introduced by 8d4cd52b6981a4e6deea7fdb77f56e40c4f3e6ba when it failed to check when msecs == -1. This manifested visibly in KDE failing to connect to any SSL site -- kioslaves are synchronous and use waitForXXX(-1) (in this particular case, waitForEncrypted, which calls waitForReadyRead). Also, take the opportunity to convert these tests in QTcpSocket to use port 80 (a defined service in the test server) instead of port 22. Reviewed-by: Martin Petersson
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qabstractsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index a8c3964..b44d114 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1893,7 +1893,7 @@ bool QAbstractSocket::waitForReadyRead(int msecs)
if (state() != ConnectedState)
return false;
- } while (qt_timeout_value(msecs, stopWatch.elapsed()) > 0);
+ } while (msecs == -1 || qt_timeout_value(msecs, stopWatch.elapsed()) > 0);
return false;
}