aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_tls_proxy.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun_tls_proxy.erl')
-rw-r--r--src/gun_tls_proxy.erl7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gun_tls_proxy.erl b/src/gun_tls_proxy.erl
index d519919..1bd56cb 100644
--- a/src/gun_tls_proxy.erl
+++ b/src/gun_tls_proxy.erl
@@ -237,12 +237,7 @@ not_connected(cast, Msg={setopts, _}, State) ->
{keep_state_and_data, postpone};
not_connected(cast, Msg={connect_proc, {ok, Socket}}, State=#state{owner_pid=OwnerPid, extra=Extra}) ->
?DEBUG_LOG("msg ~0p state ~0p", [Msg, State]),
- %% @todo We should distinguish case when no protocol was negotiated (for socks).
- Protocol = case ssl:negotiated_protocol(Socket) of
- {ok, <<"h2">>} -> gun_http2;
- _ -> gun_http
- end,
- OwnerPid ! {?MODULE, self(), {ok, Protocol}, Extra},
+ OwnerPid ! {?MODULE, self(), {ok, ssl:negotiated_protocol(Socket)}, Extra},
%% We need to spawn this call before OTP-21.2 because it triggers
%% a cb_setopts call that blocks us. Might be OK to just leave it
%% like this once we support 21.2+ only.