From kde-commits Sun Dec 26 22:42:08 2010 From: Dawit Alemayehu Date: Sun, 26 Dec 2010 22:42:08 +0000 To: kde-commits Subject: KDE/kdelibs/kio/kio Message-Id: <20101226224208.51FAEAC8AD () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129340337130323 SVN commit 1209481 by adawit: - Commented out the code that attempted to do a read ahead optimization because it causes the condition mentioned in BR# 260769. CCMAIL:ahartmetz@gmail.com CCBUG:260769 M +7 -6 tcpslavebase.cpp --- trunk/KDE/kdelibs/kio/kio/tcpslavebase.cpp #1209480:1209481 @@ -267,18 +267,19 @@ } if (!d->socket.bytesAvailable()) { - if (d->isBlocking) { - d->socket.waitForReadyRead(-1); - } else { - d->socket.waitForReadyRead(readTimeout()); + const int timeout = d->isBlocking ? -1 : readTimeout(); + d->socket.waitForReadyRead(timeout); } - } else if (d->socket.encryptionMode() != KTcpSocket::SslClientMode || +#if 0 + // Do not do this because its only benefit is to cause a nasty side effect + // upstream in Qt. See BR# 260769. + else if (d->socket.encryptionMode() != KTcpSocket::SslClientMode || QNetworkProxy::applicationProxy().type() == QNetworkProxy::NoProxy) { // we only do this when it doesn't trigger Qt socket bugs. When it doesn't break anything // it seems to help performance. d->socket.waitForReadyRead(0); } - +#endif return d->socket.read(data, len); }