Skip to content

Commit 5b27204

Browse files
authored
Merge pull request #12700 from rabbitmq/v4.0.x-connection-tracking-crash
Fix crashes in connection tracking
2 parents 147ff24 + 67e0ee0 commit 5b27204

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/rabbit/src/rabbit_connection_tracking.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
list/0, list/1, list_on_node/1, list_on_node/2, list_of_user/1,
3636
tracked_connection_from_connection_created/1,
3737
tracked_connection_from_connection_state/1,
38-
lookup/1, count/0]).
38+
lookup/1, lookup/2, count/0]).
3939

4040
-export([count_local_tracked_items_in_vhost/1,
4141
count_local_tracked_items_of_user/1]).
@@ -233,8 +233,8 @@ lookup(Name, [Node | Nodes]) when Node == node() ->
233233
end;
234234
lookup(Name, [Node | Nodes]) ->
235235
case rabbit_misc:rpc_call(Node, ?MODULE, lookup, [Name, [Node]]) of
236-
[] -> lookup(Name, Nodes);
237-
[Row] -> Row
236+
not_found -> lookup(Name, Nodes);
237+
Row = #tracked_connection{} -> Row
238238
end.
239239

240240
lookup_internal(Name, Node) ->

0 commit comments

Comments
 (0)