From 16aa958903b213f6f661c7454676c11a33266d03 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 4 Jul 2017 18:10:58 +0200 Subject: [PATCH] Server::Session::timer is now of type unique_ptr instead of shared_ptr --- server_http.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server_http.hpp b/server_http.hpp index 0bd45f5..7d8c27e 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -268,7 +268,7 @@ namespace SimpleWeb { std::shared_ptr socket; std::shared_ptr request; - std::shared_ptr timer; + std::unique_ptr timer; void set_timeout(long seconds) { if(seconds == 0) { @@ -276,7 +276,7 @@ namespace SimpleWeb { return; } - timer = std::make_shared(socket->get_io_service()); + timer = std::unique_ptr(new asio::deadline_timer(socket->get_io_service())); timer->expires_from_now(boost::posix_time::seconds(seconds)); auto socket = this->socket; timer->async_wait([socket](const error_code &ec) {