Skip to content

Commit 766c7fa

Browse files
acogoluegnesmergify[bot]
authored andcommitted
Make process liveness check remote if necessary
References #5412 (cherry picked from commit e587e9a)
1 parent 1840afc commit 766c7fa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

deps/rabbitmq_stream/src/rabbit_stream_manager.erl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ handle_call({lookup_member, VirtualHost, Stream}, _From, State) ->
350350
false;
351351
({P, _Role})
352352
when is_pid(P) ->
353-
is_process_alive(P);
353+
process_alive(P);
354354
(_) ->
355355
false
356356
end,
@@ -875,7 +875,12 @@ process_alive(Pid) ->
875875
CurrentNode ->
876876
is_process_alive(Pid);
877877
OtherNode ->
878-
rpc:call(OtherNode, erlang, is_process_alive, [Pid], 10000)
878+
case rpc:call(OtherNode, erlang, is_process_alive, [Pid], 10000) of
879+
B when is_boolean(B) ->
880+
B;
881+
_ ->
882+
false
883+
end
879884
end.
880885

881886
is_stream_queue(Q) ->

0 commit comments

Comments
 (0)