| 84 | } |
| 85 | |
| 86 | void timer::start_unlocked() { |
| 87 | state_ = state_e::STARTED; |
| 88 | try { |
| 89 | timer_->expires_after(interval_); |
| 90 | timer_->async_wait([weak_self = weak_from_this()](auto const& _ec) { |
| 91 | if (auto self = weak_self.lock(); self) { |
| 92 | self->handle(_ec); |
| 93 | } |
| 94 | }); |
| 95 | } catch (std::exception const& _e) { |
| 96 | VSOMEIP_ERROR_P << ": Can not start timer due to: " << _e.what(); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | void timer::handle(boost::system::error_code const& _ec) { |
| 101 | if (_ec == boost::asio::error::operation_aborted) { |
nothing calls this directly
no test coverage detected