diff --git a/deps/rabbitmq_web_dispatch/src/rabbit_web_dispatch_registry.erl b/deps/rabbitmq_web_dispatch/src/rabbit_web_dispatch_registry.erl index 6d6621dff4..2782369528 100644 --- a/deps/rabbitmq_web_dispatch/src/rabbit_web_dispatch_registry.erl +++ b/deps/rabbitmq_web_dispatch/src/rabbit_web_dispatch_registry.erl @@ -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