diff --git a/src/udp_socket.cpp b/src/udp_socket.cpp index 08f256ba7..31cb3f907 100644 --- a/src/udp_socket.cpp +++ b/src/udp_socket.cpp @@ -718,7 +718,7 @@ void udp_socket::bind(udp::endpoint const& ep, error_code& ec) if (ec) return; #ifdef IPV6_V6ONLY m_ipv6_sock.set_option(v6only(true), ec); - if (ec) return; + ec.clear(); #endif m_ipv6_sock.bind(ep6, ec); if (ec) return;