nghttpx: Set promised Downstream as nghttp2 stream user data

This commit is contained in:
Tatsuhiro Tsujikawa 2015-04-08 16:07:53 +09:00
parent 36a8f24559
commit 80743ddc7b
1 changed files with 6 additions and 3 deletions

View File

@ -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();