This commit is contained in:
eidheim 2020-08-26 11:18:12 +02:00
commit 4c57860d7e
3 changed files with 5 additions and 5 deletions

View file

@ -303,7 +303,7 @@ namespace SimpleWeb {
return;
}
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(get_socket_executor(*socket), std::chrono::seconds(seconds)));
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(make_steady_timer(*socket, std::chrono::seconds(seconds))));
std::weak_ptr<Connection> self_weak(this->shared_from_this()); // To avoid keeping Connection instance alive longer than needed
timer->async_wait([self_weak](const error_code &ec) {
if(!ec) {