Don't time out on Publish page
lbry.getFileInfoWhenListed() now only times out if a timeout callback is provided.
This commit is contained in:
parent
ea1a10860e
commit
deb67e6556
1 changed files with 3 additions and 3 deletions
|
@ -306,10 +306,10 @@ lbry.getFileInfoWhenListed = function(name, callback, timeoutCallback, tryNum=0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tryNum <= 200) {
|
if (timeoutCallback && tryNum > 200) {
|
||||||
setTimeout(function() { lbry.getFileInfoWhenListed(name, callback, timeoutCallback, tryNum + 1) }, 250);
|
|
||||||
} else if (timeoutCallback) {
|
|
||||||
timeoutCallback();
|
timeoutCallback();
|
||||||
|
} else {
|
||||||
|
setTimeout(function() { lbry.getFileInfoWhenListed(name, callback, timeoutCallback, tryNum + 1) }, 250);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue