Skip to content

Commit

Permalink
msg/async/net_handler.cc: Do not apply SO_REUSEADDR for FreeBSD
Browse files Browse the repository at this point in the history
Signed-off-by: Willem Jan Withagen <[email protected]>
  • Loading branch information
wjwithagen committed Dec 20, 2016
1 parent d73be20 commit 0825f17
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/msg/async/net_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -50,6 +51,7 @@ int NetHandler::create_socket(int domain, bool reuse_addr)
return -errno;
}
}
#endif

return s;
}
Expand Down

0 comments on commit 0825f17

Please sign in to comment.