From 11518d0ad22394b3b38bf36bad05c01ea5eee787 Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Thu, 20 Dec 2018 11:15:22 +0100 Subject: [PATCH] [libfreelan] Fixes possible issue when closing application with web client feature. --- libs/freelan/src/core.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/freelan/src/core.cpp b/libs/freelan/src/core.cpp index 8fd87285..840a522a 100644 --- a/libs/freelan/src/core.cpp +++ b/libs/freelan/src/core.cpp @@ -2553,6 +2553,14 @@ namespace freelan open_fscp_server(); } + if(!m_web_client) + { + m_logger(fscp::log_level::information) << "FSCP closing as the web client was shut down."; + // closing core when FSCP was not setup so close it now! + close_fscp_server(); + return; + } + const auto renew_timestamp = certificate.not_after().to_ptime() - RENEW_CERTIFICATE_WARNING_PERIOD; m_logger(fscp::log_level::information) << "Certificate expires on " << local_adjustor::utc_to_local(certificate.not_after().to_ptime()) << ". Renewing on " << local_adjustor::utc_to_local(renew_timestamp) << ".";