OpenSSL::SSL::SSLSocket does not actually respond to a shutdown
method, and it would not be safe to call anyways.  Merely
shutdown at the OS level and let any handling thread clean it
up.
---
 lib/yahns/openssl_client.rb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb
index 619e316..5842e97 100644
--- a/lib/yahns/openssl_client.rb
+++ b/lib/yahns/openssl_client.rb
@@ -42,13 +42,8 @@ module Yahns::OpenSSLClient # :nodoc:
     @ssl.read_nonblock(len, buf, exception: false)
   end
 
-  def shutdown(*args)
-    @ssl.shutdown(*args)
-    super # BasicSocket#shutdown
-  end
-
   def close
-    @ssl.close
+    @ssl.close # flushes SSLSocket
     super # IO#close
   end
 end
-- 
EW


Reply via email to