Feature #14703 ยป 0001-net-imap-set-SO_KEEPALIVE-on-TCP-sockets.patch
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)"
|
||
-
|