Change fixed timeout of 120 seconds to Puppet[:configtimeout] so
configtimeout works if you set it to a value > 120
Fixes #1176
Signed-off-by: Andreas Rogge <a.rogge@solvention.de>
---
lib/puppet/network/http_pool.rb | 5 +++--
lib/puppet/network/xmlrpc/client.rb | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/puppet/network/http_pool.rb b/lib/puppet/network/http_pool.rb
index 9d37f2e..03c526b 100644
|
a
|
b
|
|
| 88 | 88 | class << http; attr_accessor :ca_file; end |
| 89 | 89 | |
| 90 | 90 | http.use_ssl = true |
| 91 | | http.read_timeout = 120 |
| 92 | | http.open_timeout = 120 |
| | 91 | # Use configured timeout (#1176) |
| | 92 | http.read_timeout = Puppet[:configtimeout] |
| | 93 | http.open_timeout = Puppet[:configtimeout] |
| 93 | 94 | # JJM Configurable fix for #896. |
| 94 | 95 | if Puppet[:http_enable_post_connection_check] |
| 95 | 96 | http.enable_post_connection_check = true |
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/cli
ent.rb
index f6a5e8d..2a255f6 100644
|
a
|
b
|
|
| 118 | 118 | nil, # user |
| 119 | 119 | nil, # password |
| 120 | 120 | true, # use_ssl |
| 121 | | 120 # a two minute timeout, instead of 30 seconds |
| | 121 | Puppet[:configtimeout] # use configured timeout (#1176) |
| 122 | 122 | ) |
| 123 | 123 | @http = Puppet::Network::HttpPool.http_instance(@host, @port) |
| 124 | 124 | end |