diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-13 06:32:50 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-13 06:32:50 +0100 |
| commit | 49732d290d29ed81d30a096b352c8a7640e0f13e (patch) | |
| tree | 3e84196e0ec4f6d855012e382e41fd3b4b40b165 /src | |
| parent | 7fd510b08ac99f60655c43fc0562d8fa0fb8040b (diff) | |
| download | rabbitmq-server-git-49732d290d29ed81d30a096b352c8a7640e0f13e.tar.gz | |
tiny simplifying refactor
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_networking.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rabbit_networking.erl b/src/rabbit_networking.erl index 3a3357ba9d..f968b0d890 100644 --- a/src/rabbit_networking.erl +++ b/src/rabbit_networking.erl @@ -242,8 +242,7 @@ connection_info_all() -> cmap(fun (Q) -> connection_info(Q) end). connection_info_all(Items) -> cmap(fun (Q) -> connection_info(Q, Items) end). close_connection(Pid, Explanation) -> - case lists:any(fun ({_, ChildPid, _, _}) -> ChildPid =:= Pid end, - supervisor:which_children(rabbit_tcp_client_sup)) of + case lists:member(Pid, connections()) of true -> rabbit_reader:shutdown(Pid, Explanation); false -> throw({error, {not_a_connection_pid, Pid}}) end. |
