Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sets a default pool size for Windows as Process::RLIMIT_NOFILE is not supported #90

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/net/http/persistent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ class Net::HTTP::Persistent
##
# The default connection pool size is 1/4 the allowed open files.

DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
if Gem.win_platform? then
DEFAULT_POOL_SIZE = 256
else
DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
end

##
# The version of Net::HTTP::Persistent you are using
Expand Down