Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure rabbit_misc:pmap callbacks do not throw. #1477

Merged
merged 2 commits into from
Jan 24, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/rabbit_channel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,29 @@ emit_info(PidList, InfoItems, Ref, AggregatorPid) ->

refresh_config_local() ->
rabbit_misc:upmap(
fun (C) -> gen_server2:call(C, refresh_config, infinity) end,
fun (C) ->
try
gen_server2:call(C, refresh_config, infinity)
catch _:Reason ->
rabbit_log:error("Failed to refresh channel config "
"for channel ~p. Reason ~p",
[C, Reason])
end
end,
list_local()),
ok.

refresh_interceptors() ->
rabbit_misc:upmap(
fun (C) -> gen_server2:call(C, refresh_interceptors, ?REFRESH_TIMEOUT) end,
fun (C) ->
try
gen_server2:call(C, refresh_interceptors, ?REFRESH_TIMEOUT)
catch _:Reason ->
rabbit_log:error("Failed to refresh channel interceptors "
"for channel ~p. Reason ~p",
[C, Reason])
end
end,
list_local()),
ok.

Expand Down