Method: Net::SSH::Connection::Keepalive#should_send?

Defined in:
lib/net/ssh/connection/keepalive.rb

#should_send?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
32
# File 'lib/net/ssh/connection/keepalive.rb', line 27

def should_send?
  return false unless enabled?
  return true unless @last_keepalive_sent_at

  Time.now - @last_keepalive_sent_at >= interval
end