From be93437f45446ef8109538a3614ba538c9ce6715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 16 Oct 2020 11:43:05 +0200 Subject: Remove the transport_changed event It doesn't provide any new information compared to the other events. --- src/gun.erl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gun.erl') diff --git a/src/gun.erl b/src/gun.erl index 62abd6f..d78af0d 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -1720,16 +1720,10 @@ commands([{origin, Scheme, Host, Port, Type}|Tail], origin_host=Host, origin_port=Port, intermediaries=[Info|Intermediaries], event_handler_state=EvHandlerState}); commands([{switch_transport, Transport, Socket}|Tail], State=#state{ - protocol=Protocol, protocol_state=ProtoState0, - event_handler=EvHandler, event_handler_state=EvHandlerState0}) -> + protocol=Protocol, protocol_state=ProtoState0}) -> ProtoState = Protocol:switch_transport(Transport, Socket, ProtoState0), - EvHandlerState = EvHandler:transport_changed(#{ - socket => Socket, - transport => Transport:name() - }, EvHandlerState0), commands(Tail, active(State#state{socket=Socket, transport=Transport, - messages=Transport:messages(), protocol_state=ProtoState, - event_handler_state=EvHandlerState})); + messages=Transport:messages(), protocol_state=ProtoState})); commands([{switch_protocol, NewProtocol, ReplyTo}], State0=#state{ opts=Opts, socket=Socket, transport=Transport, event_handler=EvHandler, event_handler_state=EvHandlerState0}) -> -- cgit v1.2.3