Skip to content

Commit

Permalink
Fixed nil situation in check_running
Browse files Browse the repository at this point in the history
  • Loading branch information
gshively11 committed Feb 9, 2015
1 parent 3380ba9 commit abe97ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/haproxyctl/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def check_running
end

# verify these pid(s) exists and are haproxy
if pids.all? { |pid| pid =~ /^\d+$/ and `ps -p #{pid} -o cmd=` =~ /#{exec}/ }
if pids and pids.all? { |pid| pid =~ /^\d+$/ and `ps -p #{pid} -o cmd=` =~ /#{exec}/ }
return pids
end
end
Expand Down

0 comments on commit abe97ac

Please sign in to comment.