reset self.peers = {} after destroy

Supersedes PR #135
This commit is contained in:
Feross Aboukhadijeh 2016-03-18 23:12:54 -07:00
parent db868cac78
commit 49025c1320

View File

@ -137,6 +137,8 @@ WebSocketTracker.prototype._openSocket = function () {
var self = this
self.destroyed = false
if (!self.peers) self.peers = {}
self._onSocketConnectBound = self._onSocketConnect.bind(self)
self._onSocketErrorBound = self._onSocketError.bind(self)
self._onSocketDataBound = self._onSocketData.bind(self)