update the max if cur will be greater than max for setting the limit
Signed-off-by: Su Fei <sofat1989@126.com>
This commit is contained in:
		| @@ -31,6 +31,9 @@ func setRlimit() error { | ||||
| 		} | ||||
| 		if limit.Cur < rlimit { | ||||
| 			limit.Cur = rlimit | ||||
| 			if limit.Max < limit.Cur { | ||||
| 				limit.Max = limit.Cur | ||||
| 			} | ||||
| 			if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &limit); err != nil { | ||||
| 				return err | ||||
| 			} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 fesu
					fesu