diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-11-06 07:08:45 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-11-06 07:10:31 +0000 |
commit | 4263f312f25a8ccb197617ba46914d9734a24431 (patch) | |
tree | 1c11ecc1f6f23a151944c96ac0dbbcdb424ebdd5 | |
parent | 73ac765cb957cfded00ddbf8be3c3567e86db241 (diff) | |
download | yahns-4263f312f25a8ccb197617ba46914d9734a24431.tar.gz |
Clients may timeout due to SO_KEEPALIVE handling after a few hours. Since we have infinite keepalive, this may happen as we maintain no timers in userspace.
-rw-r--r-- | lib/yahns/http_client.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb index 5f137fd..34e99b4 100644 --- a/lib/yahns/http_client.rb +++ b/lib/yahns/http_client.rb @@ -269,7 +269,8 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc: # nil to ensure the socket is closed at the end of this function def handle_error(e) code = case e - when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::ENOTCONN + when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::ENOTCONN, + Errno::ETIMEDOUT return # don't send response, drop the connection when Yahns::ClientTimeout 408 |