Skip to content

Commit 91d0677

Browse files
committed
rabbit_peer_discovery: Set a timeout when waiting for the proxy group leader
... to exit. [How] It should never be stuck obviously™. But in case planets are not aligned, we wait for its exit with a timeout. If it stays around, this is not the end of the world. Follow up to #9797. Submitted by: @lukebakken
1 parent 8c47b0f commit 91d0677

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbit/src/rabbit_peer_discovery.erl

+6-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,12 @@ query_node_props2([], NodesAndProps, ProxyGroupLeader) ->
515515
NodesAndProps2 = sort_nodes_and_props(NodesAndProps1),
516516
%% Wait for the proxy group leader to flush its inbox.
517517
ProxyGroupLeader ! stop_proxy,
518-
receive proxy_stopped -> ok end,
518+
receive
519+
proxy_stopped ->
520+
ok
521+
after 120_000 ->
522+
ok
523+
end,
519524
NodesAndProps2.
520525

521526
-spec get_node_start_time(Node, Unit, ProxyGroupLeader) -> StartTime when

0 commit comments

Comments
 (0)