Expose WebSocketTracker socket pool

This is necessary for the Internet Archive superpeer implementation.
This commit is contained in:
John Hiesey 2018-08-09 15:28:13 -07:00
parent 77a2cb93d9
commit 7ac0e9539a

View File

@ -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