diff --git a/.rubocop.yml b/.rubocop.yml index dfd157a..312cade 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,8 +6,9 @@ AllCops: Layout/LineLength: Max: 175 +# those metrics should be disabled Metrics/AbcSize: - Max: 90 + Max: 92 Metrics/BlockLength: Max: 188 diff --git a/lib/consul/async/consul_endpoint.rb b/lib/consul/async/consul_endpoint.rb index 4789aee..b20c01f 100644 --- a/lib/consul/async/consul_endpoint.rb +++ b/lib/consul/async/consul_endpoint.rb @@ -265,7 +265,8 @@ def _handle_error(http, consul_index) def fetch options = { connect_timeout: 5, # default connection setup timeout - inactivity_timeout: conf.wait_duration + 1 + (conf.wait_duration / 16) # default connection inactivity (post-setup) timeout + inactivity_timeout: conf.wait_duration + 1 + (conf.wait_duration / 16), # default connection inactivity (post-setup) timeout + tls: { verify_peer: conf.tls_verify_peer } } unless conf.tls_cert_chain.nil? options[:tls] = { diff --git a/lib/consul/async/json_endpoint.rb b/lib/consul/async/json_endpoint.rb index 1c5f621..bdfd9d4 100644 --- a/lib/consul/async/json_endpoint.rb +++ b/lib/consul/async/json_endpoint.rb @@ -184,6 +184,7 @@ def _handle_error(http) def fetch options = { + tls: { verify_peer: conf.tls_verify_peer }, connect_timeout: 5, # default connection setup timeout inactivity_timeout: 60 # default connection inactivity (post-setup) timeout } diff --git a/lib/consul/async/vault_endpoint.rb b/lib/consul/async/vault_endpoint.rb index 2046ca5..24f5d58 100644 --- a/lib/consul/async/vault_endpoint.rb +++ b/lib/consul/async/vault_endpoint.rb @@ -230,6 +230,7 @@ def _handle_error(http) def fetch options = { + tls: { verify_peer: conf.tls_verify_peer }, connect_timeout: 5, # default connection setup timeout inactivity_timeout: 1 # default connection inactivity (post-setup) timeout }