diff options
author | Peter Hartmann <phartmann@blackberry.com> | 2013-06-11 10:45:41 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-24 10:04:14 +0200 |
commit | 48345e5d3c07d6dca12dd4ccee18fa3e0ca0ebda (patch) | |
tree | e1810808ff02ed3d101df29aa6f5593c7c5adead /src/network/access/qhttpnetworkconnectionchannel.cpp | |
parent | a418a544ce1050a85d4a04981e363ce91a8e4211 (diff) |
HTTP internals: do not open too many sockets when preconnecting
Each pair of (normal request, preconnect request) requires only one
socket. E.g. if there is 1 preconnect request in-flight and 2 normal
requests, we need only 2 sockets in total, and not 3.
Therefore, we need to keep track of whether a request is
preconnecting or a normal one.
Task-number: QTBUG-31594
Change-Id: If92ccc35abadfa6090d64ee92bd466615909c94c
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index a756f22937..1c7a61dca6 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -214,6 +214,7 @@ bool QHttpNetworkConnectionChannel::sendRequest() state = QHttpNetworkConnectionChannel::IdleState; reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; allDone(); + connection->preConnectFinished(); // will only decrease the counter reply = 0; // so we can reuse this channel return true; // we have a working connection and are done } |