Skip to content

Commit 49025c1

Browse files
committed
reset self.peers = {} after destroy
Supersedes PR webtorrent#135
1 parent db868ca commit 49025c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/client/websocket-tracker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ WebSocketTracker.prototype._openSocket = function () {
137137
var self = this
138138
self.destroyed = false
139139

140+
if (!self.peers) self.peers = {}
141+
140142
self._onSocketConnectBound = self._onSocketConnect.bind(self)
141143
self._onSocketErrorBound = self._onSocketError.bind(self)
142144
self._onSocketDataBound = self._onSocketData.bind(self)

0 commit comments

Comments
 (0)