Repository: trafficserver Updated Branches: refs/heads/master 4a143e584 -> 143c5fa4d
[TS-3081] - FetchSM cleans itself up without sending a TS_FETCH_EVENT_EXT_BODY_DONE event when there's no more data available to read in the ioBufferReader. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/143c5fa4 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/143c5fa4 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/143c5fa4 Branch: refs/heads/master Commit: 143c5fa4d4ddec7246015e1579fa020d33f71127 Parents: 4a143e5 Author: Sudheer Vinukonda <[email protected]> Authored: Fri Sep 19 15:48:30 2014 +0000 Committer: Sudheer Vinukonda <[email protected]> Committed: Fri Sep 19 15:48:30 2014 +0000 ---------------------------------------------------------------------- proxy/FetchSM.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/143c5fa4/proxy/FetchSM.cc ---------------------------------------------------------------------- diff --git a/proxy/FetchSM.cc b/proxy/FetchSM.cc index 5338d1b..d7b187a 100644 --- a/proxy/FetchSM.cc +++ b/proxy/FetchSM.cc @@ -259,9 +259,16 @@ FetchSM::InvokePluginExt(int fetch_event) resp_is_chunked > 0 ? chunked_handler.chunked_reader->read_avail() : resp_reader->read_avail()); if (resp_is_chunked > 0) { - if (!chunked_handler.chunked_reader->read_avail()) + if (!chunked_handler.chunked_reader->read_avail()) { + if (read_complete_event) { + contp->handleEvent(TS_FETCH_EVENT_EXT_BODY_DONE, this); + } goto out; + } } else if (!resp_reader->read_avail()) { + if (read_complete_event) { + contp->handleEvent(TS_FETCH_EVENT_EXT_BODY_DONE, this); + } goto out; }
