summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-12-14 04:27:38 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-12-14 04:33:26 (GMT)
commite4257e41c1c9e764d27f1c61f9173c34444236f3 (patch)
tree07109525ce24853b2fcac2ab36c1f11b02949884 /src/network/access/qnetworkreplyimpl.cpp
parent8d0863f175199384e41a00fa18a9ea7d177c7f0e (diff)
downloadQt-e4257e41c1c9e764d27f1c61f9173c34444236f3.zip
Qt-e4257e41c1c9e764d27f1c61f9173c34444236f3.tar.gz
Qt-e4257e41c1c9e764d27f1c61f9173c34444236f3.tar.bz2
Abort working replies with error when network session fails.
Otherwise the connections will stay in a zombie state until the TCP keep alive timer times out in a couple of hours. Task-number: Maemo 201619
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index cf6e674..3d1df06 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -271,8 +271,8 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected()
void QNetworkReplyImplPrivate::_q_networkSessionFailed()
{
- // Abort waiting replies.
- if (state == WaitingForSession) {
+ // Abort waiting and working replies.
+ if (state == WaitingForSession || state == Working) {
state = Working;
error(QNetworkReplyImpl::UnknownNetworkError,
QCoreApplication::translate("QNetworkReply", "Network session error."));