aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http2.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r--src/gun_http2.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index 0dad3d9..e1a9873 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -407,7 +407,9 @@ headers_frame(State0=#http2_state{content_handlers=Handlers0, commands_queue=Com
stream_ref => StreamRef
},
OriginTransport = gun_tcp_proxy,
- {_, ProtoState} = Protocol:init(ReplyTo, OriginSocket, OriginTransport, ProtoOpts),
+ {_, ProtoState} = Protocol:init(ReplyTo, OriginSocket, OriginTransport,
+ %% @todo We are giving the wrong StreamRef we need to give the list (if any).
+ ProtoOpts#{stream_ref => StreamRef}),
%% @todo EvHandlerState = EvHandler:protocol_changed(#{protocol => Protocol:name()}, EvHandlerState0),
%% @todo What about keepalive?
{store_stream(State, Stream#stream{tunnel={Protocol, ProtoState,