diff options
| author | Arnaud Cogoluègnes <acogoluegnes@gmail.com> | 2019-06-07 14:38:23 +0200 |
|---|---|---|
| committer | Arnaud Cogoluègnes <acogoluegnes@gmail.com> | 2019-06-07 14:38:23 +0200 |
| commit | 7ce71c3f5fd9d13949caa907343b0443762f67bf (patch) | |
| tree | db7f91b8376b5b9057982b085ad0942224752e09 | |
| parent | f843f1b40dd9bed0c7341cc642e677c05a5203fa (diff) | |
| download | rabbitmq-server-git-7ce71c3f5fd9d13949caa907343b0443762f67bf.tar.gz | |
Be more tolerant in rabbit_channel:get_amqp_params/2
The function can be called outside of any AMQP connection (e.g. from the
management plugin), so trying to get any protocol-specific information
from the connection state does not make much sense.
References #1767
| -rw-r--r-- | src/rabbit_channel.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 95691f25cd..cf61ae243f 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1071,7 +1071,8 @@ check_topic_authorisation(#exchange{name = Name = #resource{virtual_host = VHost get_amqp_params(_ConnPid, rabbit_reader) -> []; get_amqp_params(ConnPid, _Any) when is_pid(ConnPid) -> Timeout = get_operation_timeout(), - get_amqp_params(ConnPid, rabbit_misc:is_process_alive(ConnPid), Timeout). + get_amqp_params(ConnPid, rabbit_misc:is_process_alive(ConnPid), Timeout); +get_amqp_params(_, _) -> []. get_amqp_params(ConnPid, false, _Timeout) -> %% Connection process is dead |
