From f7ba8155d87622058b08f8e6be423a6571e7ea59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Fri, 7 Oct 2022 11:54:15 +0200 Subject: [PATCH] Fix merge conflict mistake --- src/gun_http2.erl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gun_http2.erl b/src/gun_http2.erl index a9a50d03..ec105781 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -936,20 +936,21 @@ request(State, RealStreamRef=[StreamRef|_], ReplyTo, Method, _Host, _Port, Path, Headers, Body, InitialFlow, CookieStore0, EvHandler, EvHandlerState0) -> case get_stream_by_ref(State, StreamRef) of %% @todo We should send an error to the user if the stream isn't ready. - Stream=#stream{tunnel=Tunnel=#tunnel{protocol=Proto, protocol_state=ProtoState0, info=#{ + Stream=#stream{tunnel=#tunnel{protocol=Proto, protocol_state=ProtoState0, info=#{ origin_host := OriginHost, origin_port := OriginPort}}} -> - {ProtoState, CookieStore, EvHandlerState} = Proto:request(ProtoState0, RealStreamRef, + {Commands, CookieStore, EvHandlerState1} = Proto:request(ProtoState0, RealStreamRef, ReplyTo, Method, OriginHost, OriginPort, Path, Headers, Body, InitialFlow, CookieStore0, EvHandler, EvHandlerState0), - {store_stream(State, Stream#stream{tunnel=Tunnel#tunnel{protocol_state=ProtoState}}), - CookieStore, EvHandlerState}; + {ResCommands, EvHandlerState} = tunnel_commands(Commands, + Stream, State, EvHandler, EvHandlerState1), + {ResCommands, CookieStore, EvHandlerState}; #stream{tunnel=undefined} -> ReplyTo ! {gun_error, self(), stream_ref(State, StreamRef), {badstate, "The stream is not a tunnel."}}, - {State, CookieStore0, EvHandlerState0}; + {[], CookieStore0, EvHandlerState0}; error -> - {error_stream_not_found(State, StreamRef, ReplyTo), - CookieStore0, EvHandlerState0} + error_stream_not_found(State, StreamRef, ReplyTo), + {[], CookieStore0, EvHandlerState0} end. request1(State0=#http2_state{socket=Socket, transport=Transport, opts=Opts,