diff options
author | Loïc Hoguin <[email protected]> | 2020-10-22 18:48:06 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2020-11-02 17:16:57 +0100 |
commit | d5f1a47e9ab758a51b23440eb72a0251527f3f7b (patch) | |
tree | e7c27355da10d89483394314a25cd5307ccc7da6 /src/gun_tunnel.erl | |
parent | 465d072abf4a76104d4562ed15345b27fe9a0cff (diff) | |
download | gun-d5f1a47e9ab758a51b23440eb72a0251527f3f7b.tar.gz gun-d5f1a47e9ab758a51b23440eb72a0251527f3f7b.tar.bz2 gun-d5f1a47e9ab758a51b23440eb72a0251527f3f7b.zip |
Initial implementation of Websocket over HTTP/2http2-websocket
Diffstat (limited to 'src/gun_tunnel.erl')
-rw-r--r-- | src/gun_tunnel.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gun_tunnel.erl b/src/gun_tunnel.erl index 7c29684..2594d24 100644 --- a/src/gun_tunnel.erl +++ b/src/gun_tunnel.erl @@ -340,12 +340,12 @@ connect(State=#tunnel_state{info=#{origin_host := Host, origin_port := Port}, EvHandler, EvHandlerState0), {State#tunnel_state{protocol_state=ProtoState}, EvHandlerState}. -cancel(State0=#tunnel_state{protocol=Proto, protocol_state=ProtoState}, +cancel(State=#tunnel_state{protocol=Proto, protocol_state=ProtoState0}, StreamRef0, ReplyTo, EvHandler, EvHandlerState0) -> - StreamRef = maybe_dereference(State0, StreamRef0), - {Commands, EvHandlerState1} = Proto:cancel(ProtoState, StreamRef, ReplyTo, EvHandler, EvHandlerState0), - {State, EvHandlerState} = commands(Commands, State0, EvHandler, EvHandlerState1), - {{state, State}, EvHandlerState}. + StreamRef = maybe_dereference(State, StreamRef0), + {ProtoState, EvHandlerState} = Proto:cancel(ProtoState0, StreamRef, + ReplyTo, EvHandler, EvHandlerState0), + {State#tunnel_state{protocol_state=ProtoState}, EvHandlerState}. timeout(State=#tunnel_state{protocol=Proto, protocol_state=ProtoState0}, Msg, TRef) -> case Proto:timeout(ProtoState0, Msg, TRef) of |