From 36ac717872e69137dbd7cc916aedea035004f10b Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Thu, 28 Mar 2013 17:39:43 -0400 Subject: [PATCH] Lower the server-side heartbeat frequency slightly so its maximum value is less than 60 (imported from commit d61e12a985d833843c9ae757465701f0057d5ee8) --- zephyr/lib/event_queue.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zephyr/lib/event_queue.py b/zephyr/lib/event_queue.py index f9c5a3fd75..ef957697ff 100644 --- a/zephyr/lib/event_queue.py +++ b/zephyr/lib/event_queue.py @@ -14,7 +14,12 @@ import tornado import random IDLE_EVENT_QUEUE_TIMEOUT_SECS = 60 * 10 -HEARTBEAT_MIN_FREQ_SECS = 50 +# The heartbeats effectively act as a server-side timeout for +# get_events(). The actual timeout value is randomized for each +# client connection based on the below value. We ensure that the +# maximum timeout value is 55 seconds, to deal with crappy home +# wireless routers that kill "inactive" http connections. +HEARTBEAT_MIN_FREQ_SECS = 45 class ClientDescriptor(object): def __init__(self, user_profile_id, id, event_types=None, apply_markdown=True):