Skip to content

Commit

Permalink
[libfreelan] Fixes possible issue when closing application with web c…
Browse files Browse the repository at this point in the history
…lient feature.
  • Loading branch information
s-vincent committed Dec 20, 2018
1 parent 90573dc commit 11518d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/freelan/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) << ".";
Expand Down

0 comments on commit 11518d0

Please sign in to comment.