summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-11-06 13:47:53 -0500
committerTerence Lee <hone02@gmail.com>2013-11-09 18:39:50 -0500
commit8a6c322735e5f7c3327960791a14bfec60971fde (patch)
tree408fb47ea9c2376802181aeb2106bdf5baffd933
parent628927b6eebf2523ad18f7042da6ac598d000d61 (diff)
downloadbundler-8a6c322735e5f7c3327960791a14bfec60971fde.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