lib/le/host/http.rb in le-2.7.3 vs lib/le/host/http.rb in le-2.7.4
- old
+ new
@@ -171,11 +171,11 @@
if @ssl
port = DATA_PORT_SECURE
else
port = DATA_PORT_UNSECURE
end
- else
+ else
if @udp_port
host = API_SERVER
port = @udp_port
elsif @datahub_enabled
host = @datahub_ip
@@ -227,11 +227,11 @@
root_delay = 0.1
loop do
begin
openConnection
break
- rescue TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError
+ rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError
dbg "LE: Unable to connect to Logentries due to timeout(#{ $! })"
rescue
dbg "LE: Got exception in reopenConnection - #{ $! }"
raise
end
@@ -266,10 +266,10 @@
data = @queue.pop
break if data == SHUTDOWN_COMMAND
loop do
begin
@conn.write(data)
- rescue TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError
+ rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError
dbg "LE: Connection timeout(#{ $! }), try to reopen connection"
reopenConnection
next
rescue
dbg("LE: Got exception in run loop - #{ $! }")