aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_tunnel.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2025-03-21 13:10:50 +0100
committerLoïc Hoguin <[email protected]>2025-03-21 13:10:50 +0100
commitdd1a09d7c8395d8e77d40a8bc5e1e4537c3c15b3 (patch)
tree3d5b39a82b96a0f27790d4f441f69f3fec424b63 /src/gun_tunnel.erl
parent04c3436586eb150225791f96692eeff78f4d27c1 (diff)
downloadgun-respect-remote-concurrency-limit.tar.gz
gun-respect-remote-concurrency-limit.tar.bz2
gun-respect-remote-concurrency-limit.zip
Respect remote concurrency limit for headers/connect/ws_upgraderespect-remote-concurrency-limit
In order to simplify the implementation the CookieStore is given to the connect function now, even though it's not currently used.
Diffstat (limited to 'src/gun_tunnel.erl')
-rw-r--r--src/gun_tunnel.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gun_tunnel.erl b/src/gun_tunnel.erl
index 4d7a904..a6d51e3 100644
--- a/src/gun_tunnel.erl
+++ b/src/gun_tunnel.erl
@@ -27,7 +27,7 @@
-export([headers/12]).
-export([request/13]).
-export([data/7]).
--export([connect/9]).
+-export([connect/10]).
-export([cancel/5]).
-export([timeout/3]).
-export([stream_info/2]).
@@ -344,13 +344,13 @@ data(State=#tunnel_state{socket=Socket, transport=Transport,
connect(State=#tunnel_state{info=#{origin_host := Host, origin_port := Port},
protocol=Proto, protocol_state=ProtoState0},
StreamRef0, ReplyTo, Destination, _, Headers, InitialFlow,
- EvHandler, EvHandlerState0) ->
+ CookieStore0, EvHandler, EvHandlerState0) ->
StreamRef = maybe_dereference(State, StreamRef0),
- {Commands, EvHandlerState1} = Proto:connect(ProtoState0, StreamRef,
+ {Commands, CookieStore, EvHandlerState1} = Proto:connect(ProtoState0, StreamRef,
ReplyTo, Destination, #{host => Host, port => Port}, Headers, InitialFlow,
- EvHandler, EvHandlerState0),
+ CookieStore0, EvHandler, EvHandlerState0),
{ResCommands, EvHandlerState} = commands(Commands, State, EvHandler, EvHandlerState1),
- {ResCommands, EvHandlerState}.
+ {ResCommands, CookieStore, EvHandlerState}.
cancel(State=#tunnel_state{protocol=Proto, protocol_state=ProtoState0},
StreamRef0, ReplyTo, EvHandler, EvHandlerState0) ->