Merge pull request #286 from jhiesey/master

Expose WebSocketTracker socket pool
This commit is contained in:
Feross Aboukhadijeh 2018-08-09 16:19:48 -07:00 committed by GitHub
commit 313f43533c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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