Method: OnStomp::Connections::Heartbeating#heartbeat_broker_limit

Defined in:
lib/onstomp/connections/heartbeating.rb

#heartbeat_broker_limitFixnum

Maximum number of milliseconds allowed between bytes being sent from the broker, or 0 if there is no limit. This method will add a 10% margin of error to the timeout determined from heartbeat negotiation to allow a little slack before a connection is deemed dead.



48
49
50
51
52
53
# File 'lib/onstomp/connections/heartbeating.rb', line 48

def heartbeat_broker_limit
  unless defined?(@heartbeat_broker_limit)
    @heartbeat_broker_limit = heartbeating[1] > 0 ? (1.1 * heartbeating[1]) : 0
  end
  @heartbeat_broker_limit
end