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 de234ac commit ad580c3Copy full SHA for ad580c3
lib/client/websocket-tracker.js
@@ -128,8 +128,11 @@ WebSocketTracker.prototype._onSocketData = function (data) {
128
var self = this
129
if (self.destroyed) return
130
131
- if (!(typeof data === 'object' && data !== null)) {
132
- return self.client.emit('warning', new Error('Invalid tracker response'))
+ try {
+ data = JSON.parse(data)
133
+ } catch (err) {
134
+ self.client.emit('warning', new Error('Invalid tracker response'))
135
+ return
136
}
137
138
if (data.info_hash !== self.client._infoHashBinary) {
0 commit comments