From 125414bdd99b9facd7a24ab2790e86311fb655ce Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 23 Mar 2007 17:13:51 +0000 Subject: [PATCH] one more fix --- panda/src/downloader/httpChannel.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index 8a52c99bb5..95217531ba 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -1976,6 +1976,17 @@ run_reading_body() { getline(*_body_stream, line); } + switch (_body_stream->get_read_state()) { + case ISocketStream::RS_complete: + finished_body(false); + break; + + case ISocketStream::RS_error: + _state = HTTPChannel::S_failure; + _status_entry._status_code = HTTPChannel::SC_lost_connection; + break; + } + if (!_body_stream->is_closed()) { // There's more to come later. return true;