X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Ftracker.ts;h=915981f6754285a1cc4eb3a3a51323b2497cc161;hb=d51a33c5047a168d8c3e5d3e16982110e3a842eb;hp=c962fada5250564cb45d31d2d2585f9886d6ab8f;hpb=db48de8597897e5024f8e9ed5acb1a8f40748169;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts index c962fada5..915981f67 100644 --- a/server/controllers/tracker.ts +++ b/server/controllers/tracker.ts @@ -22,7 +22,6 @@ const trackerServer = new TrackerServer({ http: false, udp: false, ws: false, - dht: false, filter: async function (infoHash, params, cb) { if (CONFIG.TRACKER.ENABLED === false) { return cb(new Error('Tracker is disabled on this instance.')) @@ -31,7 +30,7 @@ const trackerServer = new TrackerServer({ let ip: string if (params.type === 'ws') { - ip = params.socket.ip + ip = params.ip } else { ip = params.httpReq.ip } @@ -51,7 +50,7 @@ const trackerServer = new TrackerServer({ const videoFileExists = await VideoFileModel.doesInfohashExistCached(infoHash) if (videoFileExists === true) return cb() - const playlistExists = await VideoStreamingPlaylistModel.doesInfohashExist(infoHash) + const playlistExists = await VideoStreamingPlaylistModel.doesInfohashExistCached(infoHash) if (playlistExists === true) return cb() cb(new Error(`Unknown infoHash ${infoHash} requested by ip ${ip}`))