diff options
author | Loïc Hoguin <[email protected]> | 2019-09-26 13:16:56 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-09-26 13:20:28 +0200 |
commit | 00cc1f385f94823a0684deee001b643091e235b0 (patch) | |
tree | 6e5406fb62b71b17b29f1de42ccbe01c8c191547 /src/gun_http2.erl | |
parent | d86d55c1f90b37d991e20ad0f1ac37b1e38b36e1 (diff) | |
download | gun-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.erl | 5 |
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), |