| 52 | } |
| 53 | |
| 54 | void local_socket_uds_impl::prepare_connect([[maybe_unused]] configuration const& _configuration, boost::system::error_code& _ec) { |
| 55 | std::scoped_lock const lock{socket_mtx_}; |
| 56 | socket_->open(peer_endpoint_.protocol(), _ec); |
| 57 | if (_ec) { |
| 58 | if (_ec == boost::asio::error::already_open) { |
| 59 | // not that any error above will be treated as a failure, but this one isn't really |
| 60 | // --> reset |
| 61 | _ec = boost::system::error_code(); |
| 62 | } |
| 63 | return; |
| 64 | } |
| 65 | |
| 66 | boost::system::error_code ec; |
| 67 | socket_->set_reuse_address(ec); |
| 68 | if (ec) { |
| 69 | VSOMEIP_WARNING_P << "Could not setsockopt(SO_REUSEADDR), " << ec.message() << ", " << name_; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | void local_socket_uds_impl::async_connect(connect_handler _handler) { |
| 74 | std::unique_lock lock{socket_mtx_}; |
no test coverage detected