Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip setting SO_REUSEADDR when socket is AF_UNIX
Summary: After D38076789 (4a18fd1), we started to actually set `SO_REUSEADDR` on Windows. This has broken our build because we are using `folly::AsyncServerSocket` with a UNIX Domain Socket address on Windows. Setting `SO_REUSEADDR` on the socket confuses Windows and making it failed to bind. It looks like we can safely skip setting `SO_REUSEADDR` when the address family is `AF_UNIX`. Neither Linux nor BSD supports it. https://gavv.net/articles/unix-socket-reuse/ https://stackoverflow.com/a/15717204 Reviewed By: kvtsoy Differential Revision: D38515166 fbshipit-source-id: 3dfc61ae2f5173e4750226f88fa6c32c50f76ee3
- Loading branch information