evutil_make_listen_socket_reuseable()

This commit is contained in:
Michael Davidsaver
2021-07-06 12:22:13 -07:00
parent 7682f1660d
commit cce0294c0c
+3
View File
@@ -387,6 +387,9 @@ ServIface::ServIface(const std::string& addr, unsigned short port, server::Serve
server->acceptor_loop.assertInLoop();
auto orig_port = bind_addr.port();
if(evutil_make_listen_socket_reuseable(sock.sock))
log_warn_printf(connsetup, "Unable to make socket reusable%s", "\n");
// try to bind to requested port, then fallback to a random port
while(true) {
try {