From 7ac0e9539ad5bd283143e485dc4344f3f1acd2fb Mon Sep 17 00:00:00 2001 From: John Hiesey Date: Thu, 9 Aug 2018 15:28:13 -0700 Subject: [PATCH] Expose WebSocketTracker socket pool This is necessary for the Internet Archive superpeer implementation. --- lib/client/websocket-tracker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/client/websocket-tracker.js b/lib/client/websocket-tracker.js index e021e92..04e9932 100644 --- a/lib/client/websocket-tracker.js +++ b/lib/client/websocket-tracker.js @@ -14,6 +14,8 @@ var Tracker = require('./tracker') // In practice, WebSockets are pretty slow to establish, so this gives a nice performance // boost, and saves browser resources. var socketPool = {} +// Normally this shouldn't be accessed but is occasionally useful +WebSocketTracker._socketPool = socketPool var RECONNECT_MINIMUM = 15 * 1000 var RECONNECT_MAXIMUM = 30 * 60 * 1000