aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun.erl')
-rw-r--r--src/gun.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gun.erl b/src/gun.erl
index 57d29e2..978e550 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -261,12 +261,10 @@ connect(State=#state{owner=Owner, host=Host, port=Port, type=ssl}, Retries) ->
{client, [<<"spdy/3">>, <<"http/1.1">>], <<"spdy/3">>}}],
case Transport:connect(Host, Port, Opts) of
{ok, Socket} ->
- Protocol = gun_spdy,
-%% @todo For some reasons this function doesn't work? Bug submitted.
-% Protocol = case ssl:negotiated_next_protocol(Socket) of
-% {ok, <<"spdy/3">>} -> gun_spdy;
-% _ -> gun_http
-% end,
+ Protocol = case ssl:negotiated_next_protocol(Socket) of
+ {ok, <<"spdy/3">>} -> gun_spdy;
+ _ -> gun_http
+ end,
ProtoState = Protocol:init(Owner, Socket, Transport),
before_loop(State#state{socket=Socket, transport=Transport,
protocol=Protocol, protocol_state=ProtoState});