diff --git a/include/crow/app.h b/include/crow/app.h index 264d37b51..c85ac26ba 100644 --- a/include/crow/app.h +++ b/include/crow/app.h @@ -280,6 +280,11 @@ namespace crow { ssl_server_ = std::move(std::unique_ptr(new ssl_server_t(this, bindaddr_, port_, server_name_, &middlewares_, concurrency_, timeout_, &ssl_context_))); ssl_server_->set_tick_function(tick_interval_, tick_function_); + server_->signal_clear(); + for (auto snum : signals_) + { + server_->signal_add(snum); + } notify_server_start(); ssl_server_->run(); } diff --git a/include/crow/http_server.h b/include/crow/http_server.h index fee23ef9a..e3b747e83 100644 --- a/include/crow/http_server.h +++ b/include/crow/http_server.h @@ -28,7 +28,7 @@ namespace crow public: Server(Handler* handler, std::string bindaddr, uint16_t port, std::string server_name = std::string("Crow/") + VERSION, std::tuple* middlewares = nullptr, uint16_t concurrency = 1, uint8_t timeout = 5, typename Adaptor::context* adaptor_ctx = nullptr): acceptor_(io_service_, tcp::endpoint(boost::asio::ip::address::from_string(bindaddr), port)), - signals_(io_service_, SIGINT, SIGTERM), + signals_(io_service_), tick_timer_(io_service_), handler_(handler), concurrency_(concurrency == 0 ? 1 : concurrency),