From 6a68d86a0e457e28d26bae6aefb2d1e39ffbf36a Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 2 Feb 2017 15:57:26 +0100 Subject: [PATCH] Licensing fixes for long updating intervals --- src/controller/controller_license.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/controller_license.cpp b/src/controller/controller_license.cpp index 56ee86a5..0026b47a 100644 --- a/src/controller/controller_license.cpp +++ b/src/controller/controller_license.cpp @@ -177,7 +177,7 @@ namespace Controller{ } void licenseLoop(void * np){ - unsigned long now = Util::epoch(); + unsigned long now = std::min(Util::epoch(), currentLicense["valid_from"].asInt()); while (conf.is_active){ if (Util::epoch() - now > currentLicense["interval"].asInt()){ updateLicense();