diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-02-11 12:21:57 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-02-11 12:40:43 (GMT) |
commit | 232defa5d084386a9cdeb229cefee0a4a09bca85 (patch) | |
tree | fec11e915ff90e871ced8659c57e33892c916559 /src/network | |
parent | 1e75074df0424f652c0ad1f28ef822a6a4b7d9f6 (diff) | |
download | Qt-232defa5d084386a9cdeb229cefee0a4a09bca85.zip Qt-232defa5d084386a9cdeb229cefee0a4a09bca85.tar.gz Qt-232defa5d084386a9cdeb229cefee0a4a09bca85.tar.bz2 |
QNAM HTTP: Set channel to IdleState at better place
The readyRead() from the expand() function called from allDone()
had a new request triggered for that channel even if it is not really
finished yet. Move the assignment to IdleState inside
allDone to avoid this error.
Reviewed-by: Andreas Kling
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 5bd972c..64969b0 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -286,7 +286,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() if (!socket->bytesAvailable()) { if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) { reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); } else { // try to reconnect/resend before sending an error. @@ -347,7 +346,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() emit reply->headerChanged(); if (!replyPrivate->expectContent()) { replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); return; } @@ -424,7 +422,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() // everything done, fall through } case QHttpNetworkReplyPrivate::AllDoneState: - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); break; default: @@ -570,6 +567,9 @@ void QHttpNetworkConnectionChannel::allDone() // in case of failures, each channel will attempt two reconnects before emitting error. reconnectAttempts = 2; + // now the channel can be seen as free/idle again, all signal emissions for the reply have been done + this->state = QHttpNetworkConnectionChannel::IdleState; + detectPipeliningSupport(); // move next from pipeline to current request |