Skip to content

Commit

Permalink
Merge pull request #90 from jakauppila/fix_79_windows
Browse files Browse the repository at this point in the history
Sets a default pool size for Windows as Process::RLIMIT_NOFILE is not supported
  • Loading branch information
drbrain authored Jul 24, 2019
2 parents b1c1e85 + 60784a1 commit f49e142
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit f49e142

Please sign in to comment.