about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-01-04 09:15:35 +0000
committerEric Wong <normalperson@yhbt.net>2014-01-04 09:17:32 +0000
commit0fca33cc0eea24f5b6c0e8d172d59802300b7345 (patch)
treeec436e919130a27f24bd5b4e1c40758fa02929be
parent2aef55bcad4080105fe713a0edc8ceca839755ce (diff)
downloadyahns-0fca33cc0eea24f5b6c0e8d172d59802300b7345.tar.gz
We can't do anything about EHOSTUNREACH, so quiet the backtrace.
I've noticed this happening very rarely (once every few weeks?)
while yahns was exposed to untrusted traffic.
-rw-r--r--lib/yahns/http_client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/http_client.rb b/lib/yahns/http_client.rb
index 34e99b4..849095e 100644
--- a/lib/yahns/http_client.rb
+++ b/lib/yahns/http_client.rb
@@ -270,7 +270,7 @@ class Yahns::HttpClient < Kgio::Socket # :nodoc:
   def handle_error(e)
     code = case e
     when EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::ENOTCONN,
-         Errno::ETIMEDOUT
+         Errno::ETIMEDOUT,Errno::EHOSTUNREACH
       return # don't send response, drop the connection
     when Yahns::ClientTimeout
       408