diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 3b8a199e..6506a40e 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -138,13 +138,13 @@ DhtProxyServer::DhtProxyServer(std::shared_ptr dht, in_port_t port , if (stopListeners) return; if (service_->is_up()) std::cout << getStats().toString() << std::endl; - scheduler_.edit(printStatsJob_, scheduler_.time() + PRINT_STATS_PERIOD); // Refresh stats cache auto newInfo = dht_->getNodeInfo(); { std::lock_guard lck(statsMutex_); nodeInfo_ = std::move(newInfo); } + scheduler_.edit(printStatsJob_, scheduler_.time() + PRINT_STATS_PERIOD); }); } @@ -202,7 +202,7 @@ DhtProxyServer::getNodeInfo(const std::shared_ptr& session) co const auto request = session->get_request(); int content_length = std::stoi(request->get_header("Content-Length", "0")); session->fetch(content_length, - [=](const std::shared_ptr s, const restbed::Bytes& /*b*/) + [this](const std::shared_ptr s, const restbed::Bytes& /*b*/) mutable { try { if (dht_) {