summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-13 16:55:47 +0200
committerJo-Philipp Wich <jo@mein.io>2018-07-13 16:55:47 +0200
commitb38306dcee38cd475608f821130b50f11773e1b5 (patch)
tree411189db8d27c380d9dec1a58bd54b5fa2cd32e4 /modules/luci-base/htdocs/luci-static
parent053682c4c344e5b1ee875d503ea14e3cb9447e68 (diff)
luci-base: xhr: increase poll request timeout
Some status requests can take quite some time to finish, the LuCI DSL status information in particular. Since the polling loop code already takes care of not relaunching requests which are already running, increase the per iteration timeout to up to five times the poll interval. This should be sufficient to let most operations complete. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/xhr.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/xhr.js b/modules/luci-base/htdocs/luci-static/resources/xhr.js
index 5bedaefaad..62b525ebb0 100644
--- a/modules/luci-base/htdocs/luci-static/resources/xhr.js
+++ b/modules/luci-base/htdocs/luci-static/resources/xhr.js
@@ -190,7 +190,7 @@ XHR.poll = function(interval, url, data, callback, post)
for (var i = 0, e = XHR._q[0]; i < XHR._q.length; e = XHR._q[++i])
{
if (!(XHR._t % e.interval) && !e.xhr.busy())
- e.xhr[post ? 'post' : 'get'](e.url, e.data, e.callback, e.interval * 1000 - 5);
+ e.xhr[post ? 'post' : 'get'](e.url, e.data, e.callback, e.interval * 1000 * 5 - 5);
}
XHR._t++;