设置文件句柄最大缓存为65535

This commit is contained in:
刘祥超
2024-05-16 20:40:41 +08:00
parent 777bbdf50b
commit da8d7f1437

View File

@@ -38,6 +38,9 @@ func NewOpenFileCache(maxCount int) (*OpenFileCache, error) {
if maxCount <= 0 { if maxCount <= 0 {
maxCount = 16384 maxCount = 16384
} }
if maxCount > 65535 {
maxCount = 65535
}
var cache = &OpenFileCache{ var cache = &OpenFileCache{
maxCount: maxCount, maxCount: maxCount,