From 553b2ad8add20cd629fcd90b512d97d4edd7e481 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 19 Dec 2007 11:42:22 -0600 Subject: 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. --- bin/puppetd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin') 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" -- cgit