on main help sign in
fix: make the limit really high on non-unix
commitde3d46bbcc232b76d714ce7800c7559342df811d authorRaphael Amorim <rapha850@gmail.com> dateMon 15 Sep 2025, 14:26 (1 year ago) parentd401aa3
1 file changed+2−2
internal/lsp/watcher/rlimit_stub.go+2−2
internal/lsp/watcher/rlimit_stub.go+2−2
@@ -6,7 +6,7 @@ package watcher
66// Returns a high value to indicate no practical limit.
77func MaximizeOpenFileLimit() (int, error) {
88 // Windows and other non-Unix systems don't have file descriptor limits
9− // in the same way Unix systems do. Return a high value to indicate
9+ // in the same way Unix systems do. Return a very high value to indicate
1010 // there's no practical limit to worry about.
11− return 1<<20, nil // 1M, effectively unlimited
11+ return 10_000_000, nil // 10M handles - way more than any process would use
1212}