Created
February 11, 2009 20:08
-
-
Save lak/62215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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