aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-10-16 11:43:05 +0200
committerLoïc Hoguin <[email protected]>2020-10-16 11:43:05 +0200
commitbe93437f45446ef8109538a3614ba538c9ce6715 (patch)
tree9a595afe87779f510b32d9723e148b5e80d0aef7 /src/gun.erl
parent356bf47edeb5b78765200e78d9b7a48aa98b97f5 (diff)
downloadgun-be93437f45446ef8109538a3614ba538c9ce6715.tar.gz
gun-be93437f45446ef8109538a3614ba538c9ce6715.tar.bz2
gun-be93437f45446ef8109538a3614ba538c9ce6715.zip
Remove the transport_changed event
It doesn't provide any new information compared to the other events.
Diffstat (limited to 'src/gun.erl')
-rw-r--r--src/gun.erl10
1 files changed, 2 insertions, 8 deletions
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}) ->