summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-11-06 13:47:53 -0500
committerAndre Arko <andre@arko.net>2013-11-06 13:47:57 -0500
commitec0621d81602ce7f7e24ce7e9194ba2022c2c44c (patch)
tree0f0c9df3f6e6aafcc9c51228a3b17889fee6a6e4
parent02af5bcc0631c4b99d8081348b49471778d34d95 (diff)
downloadbundler-ec0621d81602ce7f7e24ce7e9194ba2022c2c44c.tar.gz
close persistent connections before forking
-rw-r--r--lib/bundler/parallel_workers/unix_worker.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bundler/parallel_workers/unix_worker.rb b/lib/bundler/parallel_workers/unix_worker.rb
index ce7b7fe9ed..51c2d0d89c 100644
--- a/lib/bundler/parallel_workers/unix_worker.rb
+++ b/lib/bundler/parallel_workers/unix_worker.rb
@@ -14,6 +14,12 @@ module Bundler
end
end
+ def initialize(size, job)
+ # Close the persistent connections for the main thread before forking
+ Net::HTTP::Persistent.new('bundler', :ENV).shutdown
+ super
+ end
+
private
# Start forked workers for downloading gems. This version of worker