nghttpx: Don't consume response data in downstream on_stream_close_callback
Even after on_stream_close_callback, Http2DownstreamConnection is still alive and upstream keeps sending response to the client. The consumed bytes are processed normally (data_source_read_callback) and also we have a code to consume all allocated bytes for Http2DownstreamConnection object when it is deleted. This means that we don't need to and should not consume response data in downstream on_stream_close_callback. If we do, we may get assertion error in Http2DownstreamConnection::resume_read().
This commit is contained in:
parent
42ac80d3da
commit
223242b512
|
@ -774,11 +774,6 @@ int on_stream_close_callback
|
|||
auto downstream = dconn->get_downstream();
|
||||
if(downstream && downstream->get_downstream_stream_id() == stream_id) {
|
||||
|
||||
http2session->consume(downstream->get_downstream_stream_id(),
|
||||
downstream->get_response_datalen());
|
||||
|
||||
downstream->reset_response_datalen();
|
||||
|
||||
if(downstream->get_upgraded() &&
|
||||
downstream->get_response_state() == Downstream::HEADER_COMPLETE) {
|
||||
// For tunneled connection, we have to submit RST_STREAM to
|
||||
|
|
Loading…
Reference in New Issue