Commit 471cd286 authored by Dominik Charousset's avatar Dominik Charousset

Fix runtime check in `new_ipv4_acceptor`

parent 4a79df52
...@@ -1005,7 +1005,7 @@ new_ipv4_acceptor(uint16_t port, const char* addr, bool reuse) { ...@@ -1005,7 +1005,7 @@ new_ipv4_acceptor(uint16_t port, const char* addr, bool reuse) {
auto& backend = get_multiplexer_singleton(); auto& backend = get_multiplexer_singleton();
auto acceptor = new_ipv4_acceptor_impl(port, addr, reuse); auto acceptor = new_ipv4_acceptor_impl(port, addr, reuse);
auto bound_port = acceptor.second; auto bound_port = acceptor.second;
CAF_REQUIRE(bound_port == port); CAF_REQUIRE(port == 0 || bound_port == port);
return {default_socket_acceptor{backend, std::move(acceptor.first)}, return {default_socket_acceptor{backend, std::move(acceptor.first)},
bound_port}; bound_port};
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment