From 7ff38eeb2eaf5aec5ad8dbd4614c30393581e361 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 5 Mar 2015 03:00:18 +0900 Subject: [PATCH] asio: Start writing on cancel --- src/asio_http2_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/asio_http2_handler.cc b/src/asio_http2_handler.cc index 7273fdf1..9bf3e7d5 100644 --- a/src/asio_http2_handler.cc +++ b/src/asio_http2_handler.cc @@ -154,6 +154,10 @@ void response_impl::cancel(uint32_t error_code) { auto handler = stream_->handler(); handler->stream_error(stream_->get_stream_id(), error_code); + + if (!handler->inside_callback()) { + handler->initiate_write(); + } } void response_impl::start_response() {