luci-base: ui.js: gracefully handle failing confirm calls on rollback

Do not abort the poll loop if some confirm request attempts fail, which
might happen when the device starts rolling back its configuration.

Before that fix, the rollback information dialog offering an unchecked
apply was not reliably presented in such situations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6797821b8)
This commit is contained in:
Jo-Philipp Wich 2022-05-05 23:31:21 +02:00
parent e57aaf808d
commit 514a459b9b

View file

@ -4491,7 +4491,7 @@ var UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
method: 'post',
timeout: L.env.apply_timeout * 1000,
query: { sid: L.env.sessionid, token: L.env.token }
}).then(call);
}).then(call, call.bind(null, { status: 0 }, null, 0));
}, delay);
};