Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the LaunchDarkly Ruby SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [2.0.6] - 2017-02-10
## Changed
- Improved handling of http status codes that may not be integers.

## [2.0.5] - 2017-01-31
## Changed
- Improved error handling when connected to flag update stream.
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def post_flushed_events(events)
req.options.timeout = @config.read_timeout
req.options.open_timeout = @config.connect_timeout
end
if res.status / 100 != 2
if res.status < 200 || res.status >= 300
@config.logger.error("[LDClient] Unexpected status code while processing events: #{res.status}")
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ldclient-rb/requestor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def make_request(path)
return nil
end

if res.status / 100 != 2
if res.status < 200 || res.status >= 300
@config.logger.error("[LDClient] Unexpected status code #{res.status}")
return nil
end
Expand Down