diff options
| -rw-r--r-- | src/rabbit_control_main.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 3ca3d24df7..95dcb212cd 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -491,15 +491,15 @@ read_pid_file(PidFile, Wait) -> case {file:read_file(PidFile), Wait} of {{ok, Bin}, _} -> S = binary_to_list(Bin), - Spid = case string:words(S) > 1 of + PidS = case string:words(S) > 1 of true -> string:sub_word(S, 1); false -> string:strip(S, right, $\n) end, - try list_to_integer(Spid) + try list_to_integer(PidS) catch error:badarg -> exit({error, {garbage_in_pid_file, PidFile}}) end, - Spid; + PidS; {{error, enoent}, true} -> timer:sleep(?EXTERNAL_CHECK_INTERVAL), read_pid_file(PidFile, Wait); |
