summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/network/xmlrpc/client.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index 6d77286d3..c79f91d57 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -35,10 +35,6 @@ module Puppet::Network
interface.methods.each { |ary|
method = ary[0]
- if public_method_defined?(method)
- raise Puppet::DevError, "Method %s is already defined" %
- method
- end
newclient.send(:define_method,method) { |*args|
Puppet.debug "Calling %s.%s" % [namespace, method]
begin
@@ -74,6 +70,10 @@ module Puppet::Network
Puppet.warning "Other end went away; restarting connection and retrying"
self.recycle_connection
retry
+ rescue Timeout::Error => detail
+ Puppet.err "Connection timeout calling %s.%s: %s" %
+ [namespace, method, detail.to_s]
+ raise XMLRPCClientError.new("Connection Timeout").set_backtrace(detail.backtrace)
rescue => detail
if detail.message =~ /^Wrong size\. Was \d+, should be \d+$/
Puppet.warning "XMLRPC returned wrong size. Retrying."