From deb67e655642d746627097f814559fe6d305546b Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 1 Feb 2017 04:08:09 -0500 Subject: [PATCH] Don't time out on Publish page lbry.getFileInfoWhenListed() now only times out if a timeout callback is provided. --- js/lbry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } }); }