| 49 | } |
| 50 | |
| 51 | void local_server::stop() { |
| 52 | std::scoped_lock const lock{mtx_}; |
| 53 | if (state_ == state_e::STOPPED) { |
| 54 | VSOMEIP_WARNING_P << "Rejecting the attempt to stop the server when it is already stopped"; |
| 55 | return; |
| 56 | } |
| 57 | state_ = state_e::STOPPED; |
| 58 | ++lc_count_; |
| 59 | boost::system::error_code ec; |
| 60 | acceptor_->close(ec); |
| 61 | if (ec) { |
| 62 | VSOMEIP_ERROR_P << "Error encountered: " << ec.message() << ", self: " << this; |
| 63 | } |
| 64 | if (debounce_) { |
| 65 | debounce_->stop(); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | void local_server::halt() { |
| 70 | std::scoped_lock const lock{mtx_}; |
no test coverage detected