inkel/haproxy-ruby — pull request #8 by zylad (2012-08-30 10:37:12+00:00)
Title: Empty line prevention.

In case when HAProxy socket returned empty line, exception was raised:

NoMethodError: undefined method `downcase' for nil:NilClass
from ./lib/haproxy/socket_reader.rb:19:in `info'
from ./lib/haproxy/socket_reader.rb:93:in `send_cmd'
from ./lib/haproxy/socket_reader.rb:91:in `each'
from ./lib/haproxy/socket_reader.rb:91:in `send_cmd'
from ./lib/haproxy/socket_reader.rb:15:in `info'
from ./lib/haproxy/stats_reader.rb:40:in `returning'
from ./lib/haproxy/socket_reader.rb:14:in `info'
from (irb):4
from /usr/lib/ruby/1.8/prettyprint.rb:799

This will prevent such situations.