From 1a6acf50781f53b1854b1ff3f6b75acf615e19dc Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 20 May 2019 10:25:49 +0200 Subject: [PATCH] Remove redundant call Remove redundant call --- sonoff/sonoff.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 9517755ee..f58fc8947 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2181,7 +2181,9 @@ void Every250mSeconds(void) SettingsDefault(); restart_flag = 2; } - SettingsSaveAll(); + if (2 == restart_flag) { + SettingsSaveAll(); + } restart_flag--; if (restart_flag <= 0) { AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_APPLICATION D_RESTARTING));