In case of connection, dns or timeout error, puppet-load would not report the error correctly or could crash.
Signed-off-by: Brice Figureau <[email protected]> --- ext/puppet-load.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ext/puppet-load.rb b/ext/puppet-load.rb index 24437c1..35bee6e 100644 --- a/ext/puppet-load.rb +++ b/ext/puppet-load.rb @@ -265,6 +265,8 @@ class RequestPool end def spawn_request(index) + @times[index] = Time.now + @sizes[index] = 0 nodeidx = index % $options[:node].size node = $options[:node][nodeidx] EventMachine::HttpRequest.new("https://#{$options[:server]}:#{$options[:masterport]}/production/catalog/#{node}").get( @@ -302,7 +304,7 @@ class RequestPool } conn.errback { - Puppet.debug("Client #{index} finished with an error: #{conn.response.error}") + Puppet.debug("Client #{index} finished with an error: #{conn.error}") @times[index] = Time.now - @times[index] @responses[:failed].push(conn) check_progress -- 1.7.2.1 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
