NOSONAR(cpp:S5213) - Handler is already std::function from async_accept, making this a template provides no benefit
| 116 | |
| 117 | // NOSONAR(cpp:S5213) - Handler is already std::function from async_accept, making this a template provides no benefit |
| 118 | void local_acceptor_uds_impl::accept_cbk(boost::system::error_code const& _ec, connection_handler _handler, std::shared_ptr<socket> _socket, |
| 119 | std::shared_ptr<endpoint> _remote_ep) { |
| 120 | if (_ec) { |
| 121 | _handler(_ec, nullptr); |
| 122 | return; |
| 123 | } |
| 124 | // transfer ownership of the socket member, subsequent async_accept calls will re-instantiate it |
| 125 | _handler( |
| 126 | _ec, |
| 127 | std::make_shared<local_socket_uds_impl>(io_, std::move(_socket), own_endpoint_, std::move(*_remote_ep), socket_role_e::SERVER)); |
| 128 | } |
| 129 | } |
| 130 | #endif |