diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-06-05 13:36:28 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-06-05 13:36:28 +0100 |
commit | 85019edb003baf95cd6b8263d3ad1e5bcd123018 (patch) | |
tree | 2143d9cabc3506cc3b1a8a1c767193bff92ca32f | |
parent | fc936b5214db03bc64f65e69b8f02e6bae96631a (diff) | |
download | rabbitmq-server-85019edb003baf95cd6b8263d3ad1e5bcd123018.tar.gz |
cosmetic
-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 3ca3d24d..95dcb212 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); |