usage of deadline conn at Accept() breaks websocket (#19789)

fortunately not wired up to use, however if anyone
enables deadlines for conn then sporadically MinIO
startups fail.
This commit is contained in:
Harshavardhana
2024-05-22 10:49:27 -07:00
committed by GitHub
parent d0e0b81d8e
commit ca80eced24
5 changed files with 10 additions and 55 deletions

View File

@@ -39,10 +39,12 @@ func setTCPParametersFn(opts TCPOptions) func(network, address string, c syscall
_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEPORT, 1)
{
if opts.SendBufSize > 0 {
// Enable big buffers
_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_SNDBUF, opts.SendBufSize)
}
if opts.RecvBufSize > 0 {
_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_RCVBUF, opts.RecvBufSize)
}