mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
19d61737c1
- Document the change at docs/CHANGELOG.md - Set the default value for -vmstorageUserTimeout to 3 seconds. This is much better than the 0 value, which means that TCP connection to unreachable vmstorage could block for up to 16 minutes. - Document -vmstorageUserTimeout at docs/Cluster-VictoriaMetrics.md
11 lines
253 B
Go
11 lines
253 B
Go
package netutil
|
|
|
|
import (
|
|
"golang.org/x/sys/unix"
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
func setTCPUserTimeout(fd uintptr, timeout time.Duration) error {
|
|
return syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, int(timeout.Milliseconds()))
|
|
}
|