tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
602 stars 103 forks source link

Timeout on spdycat does not work #37

Closed yelkhatib closed 12 years ago

yelkhatib commented 12 years ago

No matter if I specify a timeout or not, or how long it is it does not time out and waits the network to fail (about 70-80 seconds).

tatsuhiro-t commented 12 years ago

The timeout handling only occurs in SPDY frame exchange and no timeout handling is done in DNS and SSL/TLS handshake. I think you experienced network failure in either DNS or SSL/TLS handshake phase.

tatsuhiro-t commented 12 years ago

Added timeout handling in SSL/TLS handshake (I mean, which includes establishing connection and SSL/TLS handshake). For DNS, as long as getaddrinfo standard function, we cannot set timeout in user program. It can be achieved using asynchronous DNS library such as c-ares, but I have no plan to use it at the moment so it is wontfix. I think healthy host does not have DNS problem normally, and handling timeout in connection establishment, SSL/TLS handshake and SPDY session is enough for most cases.

yelkhatib commented 12 years ago

This is good enough for me. Thanks!