Project

General

Profile

Feature #14703 ยป 0001-net-imap-set-SO_KEEPALIVE-on-TCP-sockets.patch

normalperson (Eric Wong), 04/20/2018 11:52 AM

View differences:

lib/net/imap.rb
end
def tcp_socket(host, port)
Socket.tcp(host, port, :connect_timeout => @open_timeout)
s = Socket.tcp(host, port, :connect_timeout => @open_timeout)
s.setsockopt(:SOL_SOCKET, :SO_KEEPALIVE, true)
s
rescue Errno::ETIMEDOUT
raise Net::OpenTimeout, "Timeout to open TCP connection to " +
"#{host}:#{port} (exceeds #{@open_timeout} seconds)"
-
    (1-1/1)