evutil_make_listen_socket_reuseable()
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user