Skip to content

Commit

Permalink
Fix an issue in the retry policy
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxia committed Oct 31, 2016
1 parent 2231cfa commit 771481b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2016.10 - version 0.11.3-preview

ALL
* Fixed an issue in retry policies.

2016.10 - version 0.11.2-preview

ALL
Expand Down
5 changes: 4 additions & 1 deletion lib/azure/storage/core/filter/retry_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ def should_retry_on_error?(response, retry_data)
end
end

if (retry_data[:status_code] < 400)
retry_data[:retryable] = false;
return false;
# Non-timeout Cases
if (retry_data[:status_code] >= 300 && retry_data[:status_code] != 408)
elsif (retry_data[:status_code] != 408)
# Always no retry on "not implemented" and "version not supported"
if (retry_data[:status_code] == 501 || retry_data[:status_code] == 505)
retry_data[:retryable] = false;
Expand Down
2 changes: 1 addition & 1 deletion lib/azure/storage/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Version
# Fields represent the parts defined in http://semver.org/
MAJOR = 0 unless defined? MAJOR
MINOR = 11 unless defined? MINOR
UPDATE = 2 unless defined? UPDATE
UPDATE = 3 unless defined? UPDATE
PRE = 'preview' unless defined? PRE

class << self
Expand Down

0 comments on commit 771481b

Please sign in to comment.