QHttpNetworkReply:readBodyFast return early if nothing to read.
Incase there is no bytesAvailable on the socket there is no need to try to read. Change-Id: Ied9e4b8d86854b356a733fab4948739db206b6ad Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
parent
7ba7dddffd
commit
384c155627
@ -620,6 +620,8 @@ qint64 QHttpNetworkReplyPrivate::readBodyFast(QAbstractSocket *socket, QByteData
|
||||
if (readBufferMaxSize)
|
||||
toBeRead = qMin(toBeRead, readBufferMaxSize);
|
||||
|
||||
if (!toBeRead)
|
||||
return 0;
|
||||
|
||||
QByteArray bd;
|
||||
bd.resize(toBeRead);
|
||||
|
Loading…
Reference in New Issue
Block a user