Skip to content

Commit f49e142

Browse files
authored
Merge pull request #90 from jakauppila/fix_79_windows
Sets a default pool size for Windows as Process::RLIMIT_NOFILE is not supported
2 parents b1c1e85 + 60784a1 commit f49e142

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/net/http/persistent.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ class Net::HTTP::Persistent
202202
##
203203
# The default connection pool size is 1/4 the allowed open files.
204204

205-
DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
205+
if Gem.win_platform? then
206+
DEFAULT_POOL_SIZE = 256
207+
else
208+
DEFAULT_POOL_SIZE = Process.getrlimit(Process::RLIMIT_NOFILE).first / 4
209+
end
206210

207211
##
208212
# The version of Net::HTTP::Persistent you are using

0 commit comments

Comments
 (0)