Skip to content

Commit

Permalink
check headers for Retry-After in absence of retry-after
Browse files Browse the repository at this point in the history
  • Loading branch information
wtn authored and sferik committed Mar 7, 2011
1 parent 3adcc15 commit 9242532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/twitter/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(message, http_headers)
#
# @see http://dev.twitter.com/pages/rate-limiting
def retry_after
@http_headers.values_at('retry-after', 'Retry-After').first.to_i
@http_headers.values_at('retry-after', 'Retry-After').detect {|value| value }.to_i
end
end

Expand Down

0 comments on commit 9242532

Please sign in to comment.