This is an automated email from the ASF dual-hosted git repository. kgiusti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
commit 7515af4791c86d1527f23c9d9341969d3c3b0409 Author: Kenneth Giusti <[email protected]> AuthorDate: Sun Jan 3 15:25:45 2021 -0500 DISPATCH-1744: clear close expected flag when close occurs --- src/adaptors/http1/http1_codec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/adaptors/http1/http1_codec.c b/src/adaptors/http1/http1_codec.c index 1047fcc..7669d26 100644 --- a/src/adaptors/http1/http1_codec.c +++ b/src/adaptors/http1/http1_codec.c @@ -1367,12 +1367,14 @@ void h1_codec_connection_rx_closed(h1_codec_connection_t *conn) qd_buffer_list_free_buffers(&conn->decoder.incoming); decoder->read_ptr = NULL_I_PTR; - // complete any "done" requests + // check if current request is completed hrs = DEQ_HEAD(conn->hrs_queue); - while (hrs && hrs->response_complete && hrs->request_complete) { - conn->config.request_complete(hrs, false); - h1_codec_request_state_free(hrs); - hrs = DEQ_HEAD(conn->hrs_queue); + if (hrs) { + hrs->close_expected = false; // the close just occurred + if (hrs->response_complete && hrs->request_complete) { + conn->config.request_complete(hrs, false); + h1_codec_request_state_free(hrs); + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
