Browse Source

fix freebsd limit

ls 2 years ago
parent
commit
6c01ef9ac1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      sys/limit_freebsd.go

+ 2 - 2
sys/limit_freebsd.go

@@ -13,8 +13,8 @@ func SetLimit(max uint64) error {
 		return err
 	}
 
-	rlimit.Cur = max
-	rlimit.Max = max
+	rlimit.Cur = int64(max)
+	rlimit.Max = int64(max)
 	err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlimit)
 	if err != nil {
 		return err