fix: set ulimit error

This commit is contained in:
buyuxiang
2022-05-26 18:33:37 +08:00
parent 731f9fbad9
commit d93a374fbf

View File

@@ -23,6 +23,7 @@ func SetUlimit(limit uint64) {
}
rLimit.Cur = limit
rLimit.Max = limit
log.Info().Uint64("limit", rLimit.Cur).Msg("set current ulimit")
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {