aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http2.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-09-26 13:16:56 +0200
committerLoïc Hoguin <[email protected]>2019-09-26 13:20:28 +0200
commit00cc1f385f94823a0684deee001b643091e235b0 (patch)
tree6e5406fb62b71b17b29f1de42ccbe01c8c191547 /src/gun_http2.erl
parentd86d55c1f90b37d991e20ad0f1ac37b1e38b36e1 (diff)
downloadgun-00cc1f385f94823a0684deee001b643091e235b0.tar.gz
gun-00cc1f385f94823a0684deee001b643091e235b0.tar.bz2
gun-00cc1f385f94823a0684deee001b643091e235b0.zip
Add reply_to option to ws_upgrade; remove notowner entirely
The reply_to option is also propagated when we switch protocols.
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r--src/gun_http2.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index e6f09ea..bbc76ab 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -50,7 +50,6 @@
}).
-record(http2_state, {
- owner :: pid(),
socket :: inet:socket() | ssl:sslsocket(),
transport :: module(),
opts = #{} :: gun:http2_opts(),
@@ -119,7 +118,7 @@ opts_name() -> http2_opts.
has_keepalive() -> true.
default_keepalive() -> 5000.
-init(Owner, Socket, Transport, Opts0) ->
+init(_ReplyTo, Socket, Transport, Opts0) ->
%% We have different defaults than the protocol in order
%% to optimize for performance when receiving responses.
Opts = Opts0#{
@@ -129,7 +128,7 @@ init(Owner, Socket, Transport, Opts0) ->
{ok, Preface, HTTP2Machine} = cow_http2_machine:init(client, Opts),
Handlers = maps:get(content_handlers, Opts, [gun_data_h]),
%% @todo Better validate the preface being received.
- State = #http2_state{owner=Owner, socket=Socket,
+ State = #http2_state{socket=Socket,
transport=Transport, opts=Opts, content_handlers=Handlers,
http2_machine=HTTP2Machine},
Transport:send(Socket, Preface),