lib/syslogstash/logstash_writer.rb in syslogstash-1.1.2 vs lib/syslogstash/logstash_writer.rb in syslogstash-1.2.0

- old
+ new

@@ -106,10 +106,10 @@ begin # Rotate the next server onto the back of the list next_server = @servers.shift debug { "Trying to connect to #{next_server.to_s}" } @servers.push(next_server) - @current_server = TCPSocket.new(next_server.host, next_server.port) + @current_server = TCPSocket.new(next_server.hostname, next_server.port) rescue SystemCallError => ex # Connection failed for any number of reasons; try again debug { "Failed to connect to #{next_server.to_s}: #{ex.message} (#{ex.class})" } sleep 0.1 retry