summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/xmlrpc
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-01-19 14:20:48 -0600
committerLuke Kanies <luke@madstop.com>2008-01-19 14:20:48 -0600
commitf5674cd527defd2db9165fdc3d7f966a43b70b75 (patch)
treeab69aca5727b9beb2f5fc3735c3b5a0405c320c1 /lib/puppet/network/xmlrpc
parent7a9aae84805e415de090f0ce9be04beb8435e117 (diff)
downloadpuppet-f5674cd527defd2db9165fdc3d7f966a43b70b75.tar.gz
puppet-f5674cd527defd2db9165fdc3d7f966a43b70b75.tar.xz
puppet-f5674cd527defd2db9165fdc3d7f966a43b70b75.zip
Fixing #995 -- puppetd no longer dies at startup if the
server is not running.
Diffstat (limited to 'lib/puppet/network/xmlrpc')
-rw-r--r--lib/puppet/network/xmlrpc/client.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index 27bb3dc5e..f6a5e8db6 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -90,6 +90,13 @@ module Puppet::Network
@clients[handler] || self.mkclient(handler)
end
+ def http
+ unless @http
+ @http = Puppet::Network::HttpPool.http_instance(@host, @port, true)
+ end
+ @http
+ end
+
def initialize(hash = {})
hash[:Path] ||= "/RPC2"
hash[:Server] ||= Puppet[:server]
@@ -125,7 +132,11 @@ module Puppet::Network
end
def start
- @http.start unless @http.started?
+ begin
+ @http.start unless @http.started?
+ rescue => detail
+ Puppet.err "Could not connect to server: %s" % detail
+ end
end
def local