@@ -50,12 +50,18 @@ init({IPAddress, Port, Transport, SocketOpts, ProtoSup, ProtoOpts, OnStartup, On
5050 ConcurrentAcceptorCount , Label }) ->
5151 {ok , AckTimeout } = application :get_env (rabbit , ssl_handshake_timeout ),
5252 MaxConnections = rabbit_misc :get_env (rabbit , connection_max , infinity ),
53+ RanchListenerOpts = #{
54+ num_acceptors => ConcurrentAcceptorCount ,
55+ max_connections => MaxConnections ,
56+ handshake_timeout => AckTimeout ,
57+ connection_type => supervisor ,
58+ socket_opts => [{ip , IPAddress },
59+ {port , Port } |
60+ SocketOpts ]
61+ },
5362 {ok , {{one_for_all , 10 , 10 }, [
54- ranch :child_spec ({acceptor , IPAddress , Port }, ConcurrentAcceptorCount ,
55- Transport , [{port , Port }, {ip , IPAddress },
56- {max_connections , MaxConnections },
57- {ack_timeout , AckTimeout },
58- {connection_type , supervisor }|SocketOpts ],
63+ ranch :child_spec ({acceptor , IPAddress , Port },
64+ Transport , RanchListenerOpts ,
5965 ProtoSup , ProtoOpts ),
6066 {tcp_listener , {tcp_listener , start_link ,
6167 [IPAddress , Port ,
0 commit comments