setTimeout
This commit is contained in:
parent
1233156a64
commit
eb7ce30da9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user