void Server::AsyncAccept() {
#if WEBCC_STUDY_SERVER_THREADING
  LOG_USER("AsyncAccept");
#endif

  acceptor_.async_accept(
      [this](boost::system::error_code ec, tcp::socket socket) {
#if WEBCC_STUDY_SERVER_THREADING
        LOG_USER("Accept handler");
#endif

        // Check whether the server was stopped by a signal before this
        // completion handler had a chance to run.
        if (!acceptor_.is_open()) {
          return;
        }

        if (!ec) {
          LOG_INFO("Accepted a connection");

          auto view_matcher = std::bind(&Server::MatchViewOrStatic, this, _1,
                                        _2, _3);

          auto connection = std::make_shared<Connection>(
              std::move(socket), &pool_, &queue_, std::move(view_matcher),
              buffer_size_);

          pool_.Start(connection);
        }

        AsyncAccept();
      });
}
void Server::AsyncAccept() {
#if WEBCC_STUDY_SERVER_THREADING
  LOG_USER("AsyncAccept");
#endif

  acceptor_.async_accept(
      [this](boost::system::error_code ec, tcp::socket socket) {
#if WEBCC_STUDY_SERVER_THREADING
        LOG_USER("Accept handler");
#endif

         
         
        if (!acceptor_.is_open()) {
          return;
        }

        if (!ec) {
          LOG_INFO("Accepted a connection");

          auto view_matcher = std::bind(&Server::MatchViewOrStatic, this, _1,
                                        _2, _3);

          auto connection = std::make_shared<Connection>(
              std::move(socket), &pool_, &queue_, std::move(view_matcher),
              buffer_size_);

          pool_.Start(connection);
        }

        AsyncAccept();
      });
}