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 d5161e6 commit b2cbfafCopy full SHA for b2cbfaf
lib/client/websocket-tracker.js
@@ -169,12 +169,12 @@ WebSocketTracker.prototype._openSocket = function () {
169
} else {
170
self.socket = socketPool[self.announceUrl] = new Socket(self.announceUrl)
171
self.socket.consumers = 1
172
- self.socket.on('connect', self._onSocketConnectBound)
+ self.socket.once('connect', self._onSocketConnectBound)
173
}
174
175
self.socket.on('data', self._onSocketDataBound)
176
- self.socket.on('close', self._onSocketCloseBound)
177
- self.socket.on('error', self._onSocketErrorBound)
+ self.socket.once('close', self._onSocketCloseBound)
+ self.socket.once('error', self._onSocketErrorBound)
178
179
180
WebSocketTracker.prototype._onSocketConnect = function () {
0 commit comments