From e7bab66d291acdd627e3bcfe434792ce360483b0 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 12 Jan 2017 13:54:08 -0800 Subject: Auto-apply updates if enabled. --- service/OneService.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'service/OneService.cpp') diff --git a/service/OneService.cpp b/service/OneService.cpp index 697be24a..b273aad4 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -722,7 +722,8 @@ public: // Check for updates (if enabled) if ((_updater)&&((now - lastUpdateCheck) > 10000)) { lastUpdateCheck = now; - _updater->check(now); + if (_updater->check(now) && _updateAutoApply) + _updater->apply(); } // Refresh bindings in case device's interfaces have changed, and also sync routes to update any shadow routes (e.g. shadow default) -- cgit v1.2.3