Skip to content

Commit e1c92ec

Browse files
Merge branch 'stable'
2 parents afe052f + de5bc6e commit e1c92ec

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/rabbit_networking.erl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,16 @@ emit_connection_info_local(Items, Ref, AggregatorPid) ->
328328
connections_local()).
329329

330330
close_connection(Pid, Explanation) ->
331-
rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]),
332331
case lists:member(Pid, connections()) of
333-
true -> rabbit_reader:shutdown(Pid, Explanation);
334-
false -> throw({error, {not_a_connection_pid, Pid}})
332+
true ->
333+
Res = rabbit_reader:shutdown(Pid, Explanation),
334+
rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]),
335+
Res;
336+
false ->
337+
rabbit_log:warning("Asked to close connection ~p (reason: ~p) "
338+
"but no running cluster node reported it as an active connection. Was it already closed? ~n",
339+
[Pid, Explanation]),
340+
ok
335341
end.
336342

337343
force_connection_event_refresh(Ref) ->

0 commit comments

Comments
 (0)