summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/client.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-12-19 11:42:22 -0600
committerLuke Kanies <luke@madstop.com>2007-12-19 11:42:22 -0600
commit553b2ad8add20cd629fcd90b512d97d4edd7e481 (patch)
tree23acf8bf35ad697565647dac9c387d843552ba58 /lib/puppet/network/client.rb
parent5252f02dba8ef35db77ecb2d9bf711c1fd0b0bb2 (diff)
downloadpuppet-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.rb13
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