From 6566ea7d6bdacef9c652aebba9878b53d20b3b18 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 11 Jan 2016 17:36:47 +0900 Subject: [PATCH] nghttpx: Update doc --- src/shrpx_http2_upstream.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shrpx_http2_upstream.cc b/src/shrpx_http2_upstream.cc index de1dec18..2c590792 100644 --- a/src/shrpx_http2_upstream.cc +++ b/src/shrpx_http2_upstream.cc @@ -554,6 +554,10 @@ int on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame, auto downstream = make_unique(upstream, handler->get_mcpool(), promised_stream_id, 0); + // As long as we use nghttp2_session_mem_send(), setting stream + // user data here should not fail. This is because this callback + // is called just after frame was serialized. So no worries about + // hanging Downstream. nghttp2_session_set_stream_user_data(session, promised_stream_id, downstream.get());