Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/client/websocket-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clone from 'clone'
import Debug from 'debug'
import Peer from 'simple-peer'
import randombytes from 'randombytes'
import Socket from 'simple-websocket'
import Socket from '@thaunknown/simple-websocket'
import Socks from 'socks'

import common from '../common.js'
Expand Down Expand Up @@ -214,7 +214,7 @@ class WebSocketTracker extends Tracker {
this.expectingResponse = false

try {
data = JSON.parse(data)
data = JSON.parse(Buffer.from(data))
} catch (err) {
this.client.emit('warning', new Error('Invalid tracker response'))
return
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"type": "module",
"dependencies": {
"@thaunknown/simple-websocket": "^9.1.0",
"bencode": "^3.0.3",
"bittorrent-peerid": "^1.3.3",
"bn.js": "^5.2.0",
Expand All @@ -45,7 +46,6 @@
"run-series": "^1.1.9",
"simple-get": "^4.0.0",
"simple-peer": "^9.11.0",
"simple-websocket": "^9.1.0",
"socks": "^2.0.0",
"string2compact": "^2.0.0",
"unordered-array-remove": "^1.0.2",
Expand Down