New asio api: removed unnecessary SimpleWeb::timer_expires_after
This commit is contained in:
parent
5087f5d3df
commit
44c2f733dc
3 changed files with 3 additions and 19 deletions
|
|
@ -99,12 +99,7 @@ namespace SimpleWeb {
|
|||
timer = nullptr;
|
||||
return;
|
||||
}
|
||||
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(get_socket_context(*socket)));
|
||||
try {
|
||||
timer_expires_after(*timer, std::chrono::seconds(seconds));
|
||||
}
|
||||
catch(...) {
|
||||
}
|
||||
timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(get_socket_context(*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