From 91c1820b9ad8812b2a8c9960da0a460b0522b6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 16 Oct 2020 11:57:42 +0200 Subject: Remove commented code --- src/gun.erl | 13 ------------- src/gun_http2.erl | 9 --------- 2 files changed, 22 deletions(-) diff --git a/src/gun.erl b/src/gun.erl index d78af0d..2af6b94 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -1440,19 +1440,6 @@ handle_common_connected_no_input(info, Res -> Res end; -%% @todo -% NewProtocol = protocol_negotiated(Negotiated, Protocols), -% EvHandlerState = EvHandler:tls_handshake_end(HandshakeEvent#{ -% socket => Socket, -% protocol => NewProtocol -% }, EvHandlerState0), -% commands([{switch_protocol, NewProtocol, ReplyTo}], State0#state{event_handler_state=EvHandlerState}); -%% -% State=#state{socket=Socket, event_handler=EvHandler, event_handler_state=EvHandlerState0}) -> -% EvHandlerState = EvHandler:tls_handshake_end(HandshakeEvent#{ -% error => Reason -% }, EvHandlerState0), -% commands([Error], State#state{event_handler_state=EvHandlerState}); handle_common_connected_no_input(info, {handle_continue, StreamRef, Msg}, _, State0=#state{protocol=Protocol, protocol_state=ProtoState, event_handler=EvHandler, event_handler_state=EvHandlerState0}) -> diff --git a/src/gun_http2.erl b/src/gun_http2.erl index 8312954..c5521ce 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -467,15 +467,6 @@ headers_frame(State0=#http2_state{transport=Transport, opts=Opts, Proto = gun_tunnel, ProtoOpts = case Destination of #{transport := tls} -> -%tls_handshake(internal, {tls_handshake, -% HandshakeEvent0=#{tls_opts := TLSOpts0, timeout := TLSTimeout}, Protocols, ReplyTo}, -% State=#state{socket=Socket, transport=Transport, origin_host=OriginHost, origin_port=OriginPort, -% event_handler=EvHandler, event_handler_state=EvHandlerState0}) -> -% HandshakeEvent = HandshakeEvent0#{ -% tls_opts => TLSOpts, -% socket => Socket -% }, -% EvHandlerState = EvHandler:tls_handshake_start(HandshakeEvent, EvHandlerState0), Protocols = maps:get(protocols, Destination, [http2, http]), TLSOpts = gun:ensure_alpn_sni(Protocols, maps:get(tls_opts, Destination, []), DestHost), HandshakeEvent = #{ -- cgit v1.2.3