Skip to content

Commit

Permalink
fix rm_binding and crash on terminate/2 (2600hz#6303)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark2600 authored and jamesaimonetti committed Feb 11, 2020
1 parent 4ebf460 commit 2432993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/kazoo_amqp/src/gen_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ terminate(Reason, #state{module=Module
}) ->
Terminated = (catch Module:terminate(Reason, ModuleState)),
kz_amqp_assignments:release_consumer(Tags),
_ = [listener_federator:stop(F) || {_Broker, {F, _Ref}} <- Fs],
_ = [catch listener_federator:stop(F) || {_Broker, {F, _Ref}} <- Fs],
maybe_log_module_terminate(Module, Reason, Terminated).

-spec maybe_log_module_terminate(module(), any(), any()) -> 'ok'.
Expand Down Expand Up @@ -1410,7 +1410,7 @@ start_new_listener(Broker, Binding, Props, #state{params=Ps}) ->
-spec remove_federated_binding(federator_listeners(), binding_module(), kz_term:proplist()) -> 'ok'.
remove_federated_binding(Listeners, Binding, Props) ->
_ = [?MODULE:rm_binding(Pid, Binding, Props)
|| {_Broker, Pid} <- Listeners
|| {_Broker, {Pid, _Ref}} <- Listeners
],
'ok'.

Expand Down

0 comments on commit 2432993

Please sign in to comment.