yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [PATCH] openssl_client: remove shutdown call
@ 2015-05-09  1:05 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-05-09  1:05 UTC (permalink / raw)
  To: yahns-public

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-09  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-09  1:05 [PATCH] openssl_client: remove shutdown call Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).