Skip to content

Commit

Permalink
updated on_failure block to work with 0.5.0 of taf2-curb
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldix committed Aug 11, 2009
1 parent 28f5c7d commit 51453c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/feedzirra/feed.rb
Expand Up @@ -96,7 +96,7 @@ def self.fetch_raw(urls, options = {})
curl.on_success do |c|
responses[url] = decode_content(c)
end
curl.on_failure do |c|
curl.on_failure do |c, err|
responses[url] = c.response_code
end
end
Expand Down Expand Up @@ -235,7 +235,7 @@ def self.add_url_to_multi(multi, url, url_queue, responses, options)
end
end

curl.on_failure do |c|
curl.on_failure do |c, err|
add_url_to_multi(multi, url_queue.shift, url_queue, responses, options) unless url_queue.empty?
responses[url] = c.response_code
options[:on_failure].call(url, c.response_code, c.header_str, c.body_str) if options.has_key?(:on_failure)
Expand Down Expand Up @@ -284,7 +284,7 @@ def self.add_feed_to_multi(multi, feed, feed_queue, responses, options)
end
end

curl.on_failure do |c|
curl.on_failure do |c, err|
add_feed_to_multi(multi, feed_queue.shift, feed_queue, responses, options) unless feed_queue.empty?
response_code = c.response_code
if response_code == 304 # it's not modified. this isn't an error condition
Expand Down

0 comments on commit 51453c9

Please sign in to comment.