This commit is contained in:
kssenii 2021-03-23 05:41:21 +00:00
parent e877402406
commit 50ae954a85
2 changed files with 6 additions and 3 deletions

View File

@ -213,13 +213,12 @@ int IBridge::main(const std::vector<std::string> & /*args*/)
socket,
http_params);
server.start();
LOG_INFO(log, "Listening http://{}", address.toString());
SCOPE_EXIT({
LOG_DEBUG(log, "Received termination signal.");
LOG_DEBUG(log, "Waiting for current connections to close.");
server.stop();
for (size_t count : ext::range(1, 6))
{
if (server.currentConnections() == 0)
@ -229,6 +228,9 @@ int IBridge::main(const std::vector<std::string> & /*args*/)
}
});
server.start();
LOG_INFO(log, "Listening http://{}", address.toString());
waitForTerminationRequest();
return Application::EXIT_OK;
}

View File

@ -17,6 +17,7 @@ class IBridge : public BaseDaemon
{
public:
/// Define command line arguments
void defineOptions(Poco::Util::OptionSet & options) override;
protected: