Navigation Menu

Skip to content

Commit

Permalink
Further clarification on timeout warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
EfrainOlivares committed Jan 29, 2015
1 parent db594a5 commit ff046a0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Expand Up @@ -299,12 +299,14 @@ Ruby 1.8.7 or higher is required.

## Warning message: To disable read timeouts, please set timeout to nil instead of -1

This message is generated by the rest-client gem if the timeout is not set to nil.
The version of the gem that is compatible with ruby 1.8 and that which is compatible with
ruby 1.9 and greater behave differently. The previous revision requires a -1, while the new
version requres nil. You can silence the warning message by passing
```
:timeout => nil
```
when creating the right_api_client.
To avoid this message you can set ```:timeout``` when creating your RightAp::Client object. You will need
to use a different value Depending on which version of rest-client is being used.

### rest-client 1.6.x supports ruby 1.8.x
* ```:timeout => nil```, timeout of 60s (default of Net::HTTP)
* ```:timeout => -1```, infinite timeout.

### rest-client 1.7.x supports ruby >= 1.9.x
* **```:timeout => nil```, infinite timeout - no warning message.**
* ```:timeout => -1```, infinite timeout - plus the error message above being displayed.

0 comments on commit ff046a0

Please sign in to comment.