Merge pull request #2228 from enihcam/master

Add SO_REUSEPORT to inbound
pull/2272/head
Kslr 2020-02-19 03:33:25 +08:00 committed by GitHub
commit 4f059a1c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -104,5 +104,9 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
}
}
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, unix.SO_REUSEPORT, 1); err != nil {
return newError("failed to set SO_REUSEPORT").Base(err).AtWarning()
}
return nil
}