Server::Session::timer is now of type unique_ptr instead of shared_ptr
This commit is contained in:
parent
57a0c83f64
commit
16aa958903
1 changed files with 2 additions and 2 deletions
|
|
@ -268,7 +268,7 @@ namespace SimpleWeb {
|
|||
std::shared_ptr<socket_type> socket;
|
||||
std::shared_ptr<Request> request;
|
||||
|
||||
std::shared_ptr<asio::deadline_timer> timer;
|
||||
std::unique_ptr<asio::deadline_timer> timer;
|
||||
|
||||
void set_timeout(long seconds) {
|
||||
if(seconds == 0) {
|
||||
|
|
@ -276,7 +276,7 @@ namespace SimpleWeb {
|
|||
return;
|
||||
}
|
||||
|
||||
timer = std::make_shared<asio::deadline_timer>(socket->get_io_service());
|
||||
timer = std::unique_ptr<asio::deadline_timer>(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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue