Fix unknown infohash setting

pull/5138/head
Chocobozzz 2022-07-11 14:29:57 +02:00
parent 6504b3bfd9
commit f614635d6a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 3 deletions

View File

@ -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 })