Don't time out on Publish page

lbry.getFileInfoWhenListed() now only times out if a timeout callback
is provided.
This commit is contained in:
Alex Liebowitz 2017-02-01 04:08:09 -05:00
parent ea1a10860e
commit deb67e6556

View file

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