The meaning of timed_out?

1,284 views
Skip to first unread message

pat...@stenmark.io

unread,
Oct 17, 2013, 9:55:41 AM10/17/13
to typh...@googlegroups.com
Hi

I'm using Typhoeus in a project. I'm using the Response#timed_out? method to check if a connection times out. After a while I noticed that we get "time outs" even when the server is down, and after some digging I realized that the definition of #timed_out? is

    [:operation_timedout, :couldnt_connect].include?(return_code)

I'm wondering if this really makes sense. If you ask a response if it's timed out, I would expect it to only say yes if it's actually timed out, not if it couldn't connect at all. Is there a reason for this behaviour?

/Patrik

Hans Hasselberg

unread,
Oct 17, 2013, 5:48:32 PM10/17/13
to typh...@googlegroups.com
Thanks for asking. I honestly don't know. It could be that the return_code produced by the connecttimeout option is 'couldnt_connect'. But I need to check that.


--
You received this message because you are subscribed to the Google Groups "Typhoeus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to typhoeus+u...@googlegroups.com.
To post to this group, send email to typh...@googlegroups.com.
Visit this group at http://groups.google.com/group/typhoeus.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages