Merge pull request #103 from rracariu/master
Don't try to set the SO_REUSEPORT flag on Linux
This commit is contained in:
commit
b08bd6a9db
|
@ -220,7 +220,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
|
|||
() @trusted {
|
||||
int tmp_reuse = 1;
|
||||
// FIXME: error handling!
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &tmp_reuse, tmp_reuse.sizeof) != 0) {
|
||||
if ((options & StreamListenOptions.reusePort) && setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &tmp_reuse, tmp_reuse.sizeof) != 0) {
|
||||
invalidateSocket();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue