New asio: removed use of strand, and fixed steady_timer constructor call
This commit is contained in:
parent
44c2f733dc
commit
1b5f062678
3 changed files with 32 additions and 42 deletions
|
|
@ -99,7 +99,7 @@ namespace SimpleWeb {
|
|||
timer = nullptr;
|
||||
return;
|
||||
}
|
||||
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(get_socket_context(*socket), std::chrono::seconds(seconds)));
|
||||
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(get_socket_executor(*socket), std::chrono::seconds(seconds)));
|
||||
auto self = this->shared_from_this();
|
||||
timer->async_wait([self](const error_code &ec) {
|
||||
if(!ec) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue