diff --git a/js/lbry.js b/js/lbry.js index 02bc906c5..2800bac44 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -306,10 +306,10 @@ lbry.getFileInfoWhenListed = function(name, callback, timeoutCallback, tryNum=0) } } - if (tryNum <= 200) { - setTimeout(function() { lbry.getFileInfoWhenListed(name, callback, timeoutCallback, tryNum + 1) }, 250); - } else if (timeoutCallback) { + if (timeoutCallback && tryNum > 200) { timeoutCallback(); + } else { + setTimeout(function() { lbry.getFileInfoWhenListed(name, callback, timeoutCallback, tryNum + 1) }, 250); } }); }