Skip to content

Commit 1711dd0

Browse files
committed
Review changes
1 parent 17a4876 commit 1711dd0

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/rabbit_control_main.erl

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,11 @@ shutdown_node_and_wait_pid_to_stop(Node, Pid, Inform) ->
289289
% an RPC call to rabbit:stop_and_halt. We return error_during_shutdown
290290
% so that rabbit_cli:main can differentiate this error from
291291
% other badrpc errors
292-
{badrpc, {'EXIT', RpcErr0}} ->
293-
{error, {error_during_shutdown, RpcErr0}};
292+
{badrpc, {'EXIT', RpcErr}} ->
293+
{error, {error_during_shutdown, RpcErr}};
294294
% NB: rabbit_cli:main pretty-prints other badrpc errors using
295-
% rabbit_nodes:diagnostics, so don't modify the error here
296-
{badrpc, _}=RpcErr1 ->
297-
RpcErr1;
298-
Error ->
299-
{error, {error_during_shutdown, Error}}
295+
% rabbit_nodes:diagnostics, so don't modify the error here.
296+
Error -> Error
300297
end.
301298

302299
action(shutdown, Node, [], _Opts, Inform) ->
@@ -307,14 +304,11 @@ action(shutdown, Node, [], _Opts, Inform) ->
307304
% rpc:call. We return error_during_shutdown so that
308305
% rabbit_cli:main can differentiate this error from other badrpc
309306
% errors
310-
{badrpc, {'EXIT', RpcErr0}} ->
311-
{error, {error_during_shutdown, RpcErr0}};
307+
{badrpc, {'EXIT', RpcErr}} ->
308+
{error, {error_during_shutdown, RpcErr}};
312309
% NB: rabbit_cli:main pretty-prints other badrpc errors using
313-
% rabbit_nodes:diagnostics, so don't modify the error here
314-
{badrpc, _}=RpcErr1 ->
315-
RpcErr1;
316-
Error ->
317-
{error, {error_during_shutdown, Error}}
310+
% rabbit_nodes:diagnostics, so don't modify the error here.
311+
Error -> Error
318312
end;
319313

320314
action(stop, Node, Args, _Opts, Inform) ->

0 commit comments

Comments
 (0)