summaryrefslogtreecommitdiffstats
path: root/bin
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 /bin
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 'bin')
-rwxr-xr-xbin/puppetd6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/puppetd b/bin/puppetd
index 1235a36fe..297d4876d 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -328,7 +328,7 @@ if Puppet[:daemonize]
client.daemonize
end
-unless client.read_cert
+unless Puppet::Network::HttpPool.read_cert
# If we don't already have the certificate, then create a client to
# request one. Use the special ca stuff, don't use the normal server and port.
caclient = Puppet::Network::Client.ca.new()
@@ -350,7 +350,9 @@ unless client.read_cert
end
# Now read the new cert in.
- if client.read_cert
+ if Puppet::Network::HttpPool.read_cert
+ # If we read it in, then get rid of our existing http connection.
+ client.recycle_connection
Puppet.notice "Got signed certificate"
else
Puppet.err "Could not read certificates after retrieving them"