Skip to content

Instantly share code, notes, and snippets.

@lak
Created February 11, 2009 20:08
Show Gist options
  • Save lak/62215 to your computer and use it in GitHub Desktop.
Save lak/62215 to your computer and use it in GitHub Desktop.
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index 37ace21..33771d5 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -39,6 +39,10 @@ module Puppet::Network
Puppet.debug "Calling %s.%s" % [namespace, method]
begin
result = call("%s.%s" % [namespace, method.to_s],*args)
+ if http.started?
+ Puppet.err "HTTP instance still open after call to %s.%s" % [namespace, method]
+ http.finish
+ end
result
rescue OpenSSL::SSL::SSLError => detail
if detail.message =~ /bad write retry/
Puppet.warning "Transient SSL write error; restarting connection and retrying"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment