summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/xmlrpc
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-11 16:54:04 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-12 17:08:49 +1100
commit5e35166f1b7219d470916d1ee7a4e6852afaf1f9 (patch)
treef456f8f846f781084e06ed4a5446a6d060994b70 /lib/puppet/network/xmlrpc
parentaf3f3ae93ba1e43ac8231e4cf4e5a1f0ed8f3acb (diff)
downloadpuppet-5e35166f1b7219d470916d1ee7a4e6852afaf1f9.tar.gz
puppet-5e35166f1b7219d470916d1ee7a4e6852afaf1f9.tar.xz
puppet-5e35166f1b7219d470916d1ee7a4e6852afaf1f9.zip
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 <luke@madstop.com>
Diffstat (limited to 'lib/puppet/network/xmlrpc')
-rw-r--r--lib/puppet/network/xmlrpc/client.rb4
1 files changed, 3 insertions, 1 deletions
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