From 5e35166f1b7219d470916d1ee7a4e6852afaf1f9 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 11 Feb 2009 16:54:04 -0600 Subject: Fixing #961 - closing the http connection after every xmlrpc call There were apparently some circumstances that resulted in the connection not being closed; this just closes it every time if it's still open after the rpc call is complete. Signed-off-by: Luke Kanies --- lib/puppet/network/xmlrpc/client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/puppet') diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb index 91bb03e1f..678ab6c00 100644 --- a/lib/puppet/network/xmlrpc/client.rb +++ b/lib/puppet/network/xmlrpc/client.rb @@ -128,7 +128,7 @@ module Puppet::Network end handle_error(Errno::EPIPE, EOFError) do |client, detail, namespace, method| - Puppet.warning "Other end went away; restarting connection and retrying" + Puppet.info "Other end went away; restarting connection and retrying" client.recycle_connection return :retry end @@ -147,6 +147,8 @@ module Puppet::Network rescue Exception => detail retry if self.class.error_handler(detail).execute(self, detail, namespace, method) == :retry end + ensure + http.finish if http.started? end def http -- cgit