mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #21901: Cap the maximum number of file descriptors to use for the test.
This commit is contained in:
commit
9d8118e5c5
1 changed files with 1 additions and 1 deletions
|
@ -378,7 +378,7 @@ class ScalableSelectorMixIn:
|
|||
resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
|
||||
self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
|
||||
(soft, hard))
|
||||
NUM_FDS = hard
|
||||
NUM_FDS = min(hard, 2**16)
|
||||
except (OSError, ValueError):
|
||||
NUM_FDS = soft
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue