lib/meimei/client.rb
# Autopings any server that hasn't seen traffic in over 5 minutes
Autopings any server that hasn't seen traffic in over 5 minutes
Autopings any server that hasn ' t seen traffic in over 5 minutes
def autoping
      @servers.each do |server|
        if server.last_saw_traffic_at + 300 < Time.now
          server.write("PING #{server.hostname}")
          server.last_saw_traffic_at = Time.now
        end
      end
    end
def autoping @servers . each do | server | if server . last_saw_traffic_at + 300 < Time . now server . write ( "PING #{server.hostname}" ) server . last_saw_traffic_at = Time . now end end end
Autopings any server that hasn't seen traffic in over 5 minutes
Autopings any server that hasn ' t seen traffic in over 5 minutes
# Artificially set the last_saw_traffic_at value to now so that we don't flood the server