msg/async/net_handler.cc: Do not apply SO_REUSEADDR for FreeBSD

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
Willem Jan Withagen 2016-12-20 19:43:47 +01:00
parent d73be200e7
commit 0825f170e4

View File

@ -40,6 +40,7 @@ int NetHandler::create_socket(int domain, bool reuse_addr)
return -errno;
}
#if !defined(__FreeBSD__)
/* Make sure connection-intensive things like the benchmark
* will be able to close/open sockets a zillion of times */
if (reuse_addr) {
@ -50,6 +51,7 @@ int NetHandler::create_socket(int domain, bool reuse_addr)
return -errno;
}
}
#endif
return s;
}