Skip to content

Commit

Permalink
Merge pull request ipkn#296 from CrowCpp/fix_signals
Browse files Browse the repository at this point in the history
Fixed problems with signals
  • Loading branch information
The-EDev authored Dec 16, 2021
2 parents e75cc4d + 3fb83fa commit 9afd3c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/crow/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ namespace crow
{
ssl_server_ = std::move(std::unique_ptr<ssl_server_t>(new ssl_server_t(this, bindaddr_, port_, server_name_, &middlewares_, concurrency_, timeout_, &ssl_context_)));
ssl_server_->set_tick_function(tick_interval_, tick_function_);
ssl_server_->signal_clear();
for (auto snum : signals_)
{
ssl_server_->signal_add(snum);
}
notify_server_start();
ssl_server_->run();
}
Expand Down
2 changes: 1 addition & 1 deletion include/crow/http_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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...>* 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),
Expand Down

0 comments on commit 9afd3c4

Please sign in to comment.