about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-12-20 04:11:31 +0000
committerEric Wong <e@80x24.org>2014-12-21 01:49:40 +0000
commitdfb1252e8170af88e0730fc994f3e65120c8eb95 (patch)
treeedc1df9490386eabe9ffde6a9eaa9955052147d0
parentf8a260976417f14bb0de59ca3f6645813edb37b7 (diff)
downloadyahns-dfb1252e8170af88e0730fc994f3e65120c8eb95.tar.gz
Otherwise, we may encounter too much log spam from ordinary
shutdown or malicious (or dumb) clients which send us invalid
data to an SSL port.
-rw-r--r--lib/yahns/openssl_client.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb
index e4e76c9..619e316 100644
--- a/lib/yahns/openssl_client.rb
+++ b/lib/yahns/openssl_client.rb
@@ -34,6 +34,8 @@ module Yahns::OpenSSLClient # :nodoc:
         return :wait_readable
       rescue IO::WaitWritable
         return :wait_writable
+      rescue OpenSSL::SSL::SSLError
+        return nil
       end
       @need_accept = false
     end