diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-25 09:06:28 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-25 09:06:28 (GMT) |
commit | 9c160157d9617866ae792480a46877dcd82b9e91 (patch) | |
tree | 0f4610709807ad87536ebb19ba6df23c6eed43b9 /src/network/access/qhttpnetworkconnection.cpp | |
parent | dae9a234412d09c1af67a34262637bdc6e8c0845 (diff) | |
parent | 8b5a400581b9c037d12a9f49e075b187edcb0b00 (diff) | |
download | Qt-9c160157d9617866ae792480a46877dcd82b9e91.zip Qt-9c160157d9617866ae792480a46877dcd82b9e91.tar.gz Qt-9c160157d9617866ae792480a46877dcd82b9e91.tar.bz2 |
Merge branch '4.5' of git@scm.dev.troll.no:qt/qt
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 980c0e0..5940fba 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -265,6 +265,11 @@ bool QHttpNetworkConnectionPrivate::ensureConnection(QAbstractSocket *socket) if (socket->state() != QAbstractSocket::ConnectedState) { // connect to the host if not already connected. int index = indexOf(socket); + // resend this request after we receive the disconnected signal + if (socket->state() == QAbstractSocket::ClosingState) { + channels[index].resendCurrent = true; + return false; + } channels[index].state = ConnectingState; channels[index].pendingEncrypt = encrypt; @@ -982,6 +987,9 @@ void QHttpNetworkConnectionPrivate::_q_disconnected() channels[i].state = ReadingState; if (channels[i].reply) receiveReply(socket, channels[i].reply); + } else if (channels[i].state == IdleState && channels[i].resendCurrent) { + // re-sending request because the socket was in ClosingState + QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection); } channels[i].state = IdleState; } |