New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do i not understand `timeout()`? #175

Closed
sckott opened this Issue Dec 12, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@sckott

sckott commented Dec 12, 2014

is this the correct behavior?

# no time out
res <- GET("http://google.com", timeout(1))

# no time out
res <- GET("http://google.com", timeout(0.5))

# no time out
res <- GET("http://google.com", timeout(0.1))

# timed out
res <- GET("http://google.com", timeout(0.01))
Error in function (type, msg, asError = TRUE)  : 
  Operation timed out after 14 milliseconds with 0 bytes received

# timed out
res <- GET("http://google.com", timeout(0.001))
Error in function (type, msg, asError = TRUE)  : 
  Resolving timed out after 4 milliseconds

# no time out
res <- GET("http://google.com", timeout(0.0001))

# no time out
res <- GET("http://google.com", timeout(0.00001))

...and so on

curl docs http://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html says setting to 0 means no timeout. So is a decimal that's sufficiently small considered essentially 0?

@hadley hadley closed this in 14c11a0 Dec 31, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment