diff --git a/include/opendht/dht_proxy_client.h b/include/opendht/dht_proxy_client.h index cdbc8160e372ae3c1563b24e38c6dea4d94eeaf5..5ba3b7e75912bef40d5333b4b3dbc34bf1db8319 100644 --- a/include/opendht/dht_proxy_client.h +++ b/include/opendht/dht_proxy_client.h @@ -378,8 +378,8 @@ private: * Retrieve if we can connect to the proxy (update statusIpvX_) */ void handleProxyConfirm(const asio::error_code &ec); - Sp<asio::steady_timer> nextProxyConfirmationTimer_; - Sp<asio::steady_timer> listenerRestartTimer_; + std::unique_ptr<asio::steady_timer> nextProxyConfirmationTimer_; + std::unique_ptr<asio::steady_timer> listenerRestartTimer_; /** * Relaunch LISTEN requests if the client disconnect/reconnect. diff --git a/src/dht_proxy_client.cpp b/src/dht_proxy_client.cpp index fb7193a891163c14628776a83f1212b71b70262e..17528bbdc78fbe802f5a58094818a4a7487444bd 100644 --- a/src/dht_proxy_client.cpp +++ b/src/dht_proxy_client.cpp @@ -155,10 +155,10 @@ DhtProxyClient::startProxy() if (logger_) logger_->d("[proxy:client] start proxy with %s", proxyUrl_.c_str()); - nextProxyConfirmationTimer_ = std::make_shared<asio::steady_timer>(httpContext_, std::chrono::steady_clock::now()); + nextProxyConfirmationTimer_ = std::make_unique<asio::steady_timer>(httpContext_, std::chrono::steady_clock::now()); nextProxyConfirmationTimer_->async_wait(std::bind(&DhtProxyClient::handleProxyConfirm, this, std::placeholders::_1)); - listenerRestartTimer_ = std::make_shared<asio::steady_timer>(httpContext_); + listenerRestartTimer_ = std::make_unique<asio::steady_timer>(httpContext_); loopSignal_(); }