fix(go): int64 -> uint64 for connection limit value
This commit is contained in:
@@ -10,14 +10,14 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func setSystemConcurrentConnectionLimit(limit int64) {
|
||||
func setSystemConcurrentConnectionLimit(limit uint64) {
|
||||
var rLimit syscall.Rlimit
|
||||
if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
originalLimit := rLimit.Cur
|
||||
rLimit.Cur = uint64(limit)
|
||||
rLimit.Cur = limit
|
||||
if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user