summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_networking.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl
index 8b201fd87e..d64b8500b9 100644
--- a/src/rabbit_networking.erl
+++ b/src/rabbit_networking.erl
@@ -305,10 +305,16 @@ connection_info_all(Items, Ref, AggregatorPid) ->
connections()).
close_connection(Pid, Explanation) ->
- rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]),
case lists:member(Pid, connections()) of
- true -> rabbit_reader:shutdown(Pid, Explanation);
- false -> throw({error, {not_a_connection_pid, Pid}})
+ true ->
+ Res = rabbit_reader:shutdown(Pid, Explanation),
+ rabbit_log:info("Closing connection ~p because ~p~n", [Pid, Explanation]),
+ Res;
+ false ->
+ rabbit_log:warning("Asked to close connection ~p (reason: ~p) "
+ "but no running cluster node reported it as an active connection. Was it already closed? ~n",
+ [Pid, Explanation]),
+ ok
end.
force_connection_event_refresh(Ref) ->