diff options
| author | Luke Kanies <luke@madstop.com> | 2007-12-19 11:42:22 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-12-19 11:42:22 -0600 |
| commit | 553b2ad8add20cd629fcd90b512d97d4edd7e481 (patch) | |
| tree | 23acf8bf35ad697565647dac9c387d843552ba58 /lib/puppet/network/client.rb | |
| parent | 5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2 (diff) | |
| download | puppet-553b2ad8add20cd629fcd90b512d97d4edd7e481.tar.gz puppet-553b2ad8add20cd629fcd90b512d97d4edd7e481.tar.xz puppet-553b2ad8add20cd629fcd90b512d97d4edd7e481.zip | |
Entirely refactoring http keep-alive. There's now
a central module responsible for managing the http pool
(Puppet::Network::HttpPool), and it also handles
setting certificate information. This gets rid of
what were otherwise long chains of method calls,
and it makes the code paths much clearer.
Diffstat (limited to 'lib/puppet/network/client.rb')
| -rw-r--r-- | lib/puppet/network/client.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb index 52431e227..9a861fdf2 100644 --- a/lib/puppet/network/client.rb +++ b/lib/puppet/network/client.rb @@ -122,13 +122,8 @@ class Puppet::Network::Client end # Make sure we set the driver up when we read the cert in. - def read_cert - if super - @driver.recycle_connection(self) if @driver.respond_to?(:recycle_connection) - return true - else - return false - end + def recycle_connection + @driver.recycle_connection if @driver.respond_to?(:recycle_connection) end # A wrapper method to run and then store the last run time @@ -141,9 +136,7 @@ class Puppet::Network::Client self.run self.lastrun = Time.now.to_i rescue => detail - if Puppet[:trace] - puts detail.backtrace - end + puts detail.backtrace if Puppet[:trace] Puppet.err "Could not run %s: %s" % [self.class, detail] end end |
