From 92b2e617efcd59c8e71a33d2ad630b79c607cd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20B=C5=82aszczyk?= Date: Wed, 4 Mar 2020 05:24:10 +0100 Subject: [PATCH] #2049 Fix git_wait_interval - default set to 0 (#2050) --- docs/documentation/getting-started/configuration/index.markdown | 2 +- lib/capistrano/scm/git.rb | 2 +- spec/lib/capistrano/scm/git_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/documentation/getting-started/configuration/index.markdown b/docs/documentation/getting-started/configuration/index.markdown index b04884a5..ab4145e2 100644 --- a/docs/documentation/getting-started/configuration/index.markdown +++ b/docs/documentation/getting-started/configuration/index.markdown @@ -155,7 +155,7 @@ The following variables are settable: * Number of concurrent connections to Git repository - useful when your Git server limits the number of simultaneous connections while using SSH (like Gitlab CE). * `:git_wait_interval` - * **default:** `3` + * **default:** `0` * Number of seconds to wait after you reach the limit of concurrent connections to Git repository server and disconnect afterwards to initialize new connections. This prevents from being cut out of SSH server when you use `fail2ban` or similar software for limiting connections to server. Capistrano plugins can provide their own configuration variables. Please refer diff --git a/lib/capistrano/scm/git.rb b/lib/capistrano/scm/git.rb index 03fb9aad..97ca9d01 100644 --- a/lib/capistrano/scm/git.rb +++ b/lib/capistrano/scm/git.rb @@ -19,7 +19,7 @@ class Capistrano::SCM::Git < Capistrano::SCM::Plugin } } set_if_empty :git_max_concurrent_connections, 10 - set_if_empty :git_wait_interval, 3 + set_if_empty :git_wait_interval, 0 end def register_hooks diff --git a/spec/lib/capistrano/scm/git_spec.rb b/spec/lib/capistrano/scm/git_spec.rb index 687a39b5..86631de8 100644 --- a/spec/lib/capistrano/scm/git_spec.rb +++ b/spec/lib/capistrano/scm/git_spec.rb @@ -46,7 +46,7 @@ module Capistrano it "makes git_wait_interval" do subject.set_defaults - expect(env.fetch(:git_wait_interval)).to eq(3) + expect(env.fetch(:git_wait_interval)).to eq(0) env.set(:git_wait_interval, 5) expect(env.fetch(:git_wait_interval)).to eq(5) end