From f7d3e9b7c072bf2873be2b31d3dad6340a1289c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Thu, 22 Nov 2018 10:59:34 -0500 Subject: [PATCH] Lower reconnect min and increase variance This will allow servers to "breathe" when lots of peers are reconnecting. --- lib/client/websocket-tracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/websocket-tracker.js b/lib/client/websocket-tracker.js index 7e30292..ea473b0 100644 --- a/lib/client/websocket-tracker.js +++ b/lib/client/websocket-tracker.js @@ -16,9 +16,9 @@ var socketPool = {} // Normally this shouldn't be accessed but is occasionally useful WebSocketTracker._socketPool = socketPool -var RECONNECT_MINIMUM = 15 * 1000 +var RECONNECT_MINIMUM = 10 * 1000 var RECONNECT_MAXIMUM = 30 * 60 * 1000 -var RECONNECT_VARIANCE = 30 * 1000 +var RECONNECT_VARIANCE = 2 * 60 * 1000 var OFFER_TIMEOUT = 50 * 1000 inherits(WebSocketTracker, Tracker)