setTimeout

This commit is contained in:
wenyifan 2023-09-06 00:00:14 +08:00
parent 1233156a64
commit eb7ce30da9

View File

@ -347,7 +347,7 @@ module.exports = async ({
{
logT('search', 'get torrent via infohash with dht')
// 3 try to get torrent from metadata
const getTorrentMetadata = (tryCount = 4) => {
const getTorrentMetadata = (tryCount = 8) => {
if(tryCount <= 0) {
logT('search', 'dht NOT found anything with dht', text);
return
@ -356,7 +356,7 @@ module.exports = async ({
dhtCheckTimeout = setTimeout(() => {
lock = true
getTorrentMetadata(--tryCount)
}, 8000);
}, 16000);
torrentClient.getMetadata(text, (torrent) => {
if(lock) {
logT('search', 'this dht response not actual for', text);