From f614635d6a1c88bac6e62115c1942bfcaac5576e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Jul 2022 14:29:57 +0200 Subject: Fix unknown infohash setting --- server/controllers/tracker.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts index 23bcb971e..19a8b2bc9 100644 --- a/server/controllers/tracker.ts +++ b/server/controllers/tracker.ts @@ -74,9 +74,10 @@ if (CONFIG.TRACKER.ENABLED !== false) { }) trackerServer.on('warning', function (err) { - if (CONFIG.LOG.LOG_TRACKER_UNKNOWN_INFOHASH) { - const message = err.message || '' - if (message.includes('Unknown infoHash')) return + const message = err.message || '' + + if (CONFIG.LOG.LOG_TRACKER_UNKNOWN_INFOHASH === false && message.includes('Unknown infoHash')) { + return } logger.warn('Warning in tracker.', { err }) -- cgit v1.2.3