We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b79d42 commit c42335aCopy full SHA for c42335a
lib/websocket-tracker.js
@@ -233,10 +233,13 @@ WebSocketTracker.prototype._onSocketError = function (err) {
233
WebSocketTracker.prototype._startReconnectTimer = function () {
234
var self = this
235
var ms = Math.floor(Math.random() * RECONNECT_VARIANCE) + RECONNECT_MINIMUM
236
- setTimeout(function () {
+
237
+ var reconnectTimer = setTimeout(function () {
238
self.destroyed = false
239
self._openSocket()
240
}, ms)
241
+ if (reconnectTimer.unref) reconnectTimer.unref()
242
243
debug('reconnecting socket in %s ms', ms)
244
}
245
0 commit comments