Only register the first web-dispatch listener
The problem: on certain double IPv4 and IPv6 environments, web-dispatch will start a single listener (for management for example) but will register two listeners in the Rabbit Mnesia table. Later, RabbitMQ will crash when trying to stop or suspend them (rabbitmq-upgrade drain) because only one of the two listeners exist in Ranch. The fix: we register only the first listener, because that's the one we used to create the Ranch ref (see rabbit_networking:ranch_ref/1).
This commit is contained in:
parent
787b46e3a1
commit
9eaea139e3
|
|
@ -157,9 +157,9 @@ listener_info(Listener) ->
|
|||
P
|
||||
end,
|
||||
Port = pget(port, Listener),
|
||||
[{Protocol, IPAddress, Port}
|
||||
|| {IPAddress, _Port, _Family}
|
||||
<- rabbit_networking:tcp_listener_addresses(Port)].
|
||||
[{IPAddress, _Port, _Family} | _]
|
||||
= rabbit_networking:tcp_listener_addresses(Port),
|
||||
[{Protocol, IPAddress, Port}].
|
||||
|
||||
lookup_dispatch(Lsnr) ->
|
||||
case ets:lookup(?ETS, pget(port, Lsnr)) of
|
||||
|
|
|
|||
Loading…
Reference in New Issue