From 715c717dfd550a69877f9beb1e382817d0d2b88a Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 4 Feb 2021 20:22:27 +0800 Subject: [PATCH] clearInterval --- frontend/components/SaveConfigAndRestart.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/components/SaveConfigAndRestart.js b/frontend/components/SaveConfigAndRestart.js index e6623b452..166dce0cd 100644 --- a/frontend/components/SaveConfigAndRestart.js +++ b/frontend/components/SaveConfigAndRestart.js @@ -61,8 +61,10 @@ export default function SaveConfigAndRestart({onBack, onRestarted}) { setResponse(resp); setupRestart((resp) => { - setInterval(function() { + let t + t = setInterval(function() { ping(() => { + clearInterval(t) push("/"); }) }, 1000);