File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import clone from 'clone'
22import Debug from 'debug'
33import Peer from 'simple-peer'
44import randombytes from 'randombytes'
5- import Socket from 'simple-websocket'
5+ import Socket from '@thaunknown/ simple-websocket'
66import Socks from 'socks'
77
88import common from '../common.js'
@@ -214,7 +214,7 @@ class WebSocketTracker extends Tracker {
214214 this . expectingResponse = false
215215
216216 try {
217- data = JSON . parse ( data )
217+ data = JSON . parse ( Buffer . from ( data ) )
218218 } catch ( err ) {
219219 this . client . emit ( 'warning' , new Error ( 'Invalid tracker response' ) )
220220 return
Original file line number Diff line number Diff line change 2727 },
2828 "type" : " module" ,
2929 "dependencies" : {
30+ "@thaunknown/simple-websocket" : " ^9.1.0" ,
3031 "bencode" : " ^3.0.3" ,
3132 "bittorrent-peerid" : " ^1.3.3" ,
3233 "bn.js" : " ^5.2.0" ,
4546 "run-series" : " ^1.1.9" ,
4647 "simple-get" : " ^4.0.0" ,
4748 "simple-peer" : " ^9.11.0" ,
48- "simple-websocket" : " ^9.1.0" ,
4949 "socks" : " ^2.0.0" ,
5050 "string2compact" : " ^2.0.0" ,
5151 "unordered-array-remove" : " ^1.0.2" ,
You can’t perform that action at this time.
0 commit comments