Commit 80743ddc authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Set promised Downstream as nghttp2 stream user data

parent 36a8f245
...@@ -522,9 +522,12 @@ int on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame, ...@@ -522,9 +522,12 @@ int on_frame_send_callback(nghttp2_session *session, const nghttp2_frame *frame,
} }
return 0; return 0;
case NGHTTP2_PUSH_PROMISE: { case NGHTTP2_PUSH_PROMISE: {
auto downstream = auto promised_stream_id = frame->push_promise.promised_stream_id;
make_unique<Downstream>(upstream, handler->get_mcpool(), auto downstream = make_unique<Downstream>(upstream, handler->get_mcpool(),
frame->push_promise.promised_stream_id, 0); promised_stream_id, 0);
nghttp2_session_set_stream_user_data(session, promised_stream_id,
downstream.get());
downstream->disable_upstream_rtimer(); downstream->disable_upstream_rtimer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment