diff options
author | Eric Wong <e@80x24.org> | 2016-07-03 23:18:56 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-04 00:36:48 +0000 |
commit | b01adb35fddb5d3b9736d54d69c4304fbdfc599b (patch) | |
tree | 0b295ba0084dc344de719c61e91dcecba78b808d | |
parent | fea1a62c40027e4fa3ef6eda9fdcd5d6b9c2a90b (diff) | |
download | yahns-b01adb35fddb5d3b9736d54d69c4304fbdfc599b.tar.gz |
When we call shutdown on bad upstream responses, FD limits, or server termination, we need to ensure the TLS connection is terminated properly by calling SSL_shutdown and avoiding confusion on the client side (or violating TLS specs!).
-rw-r--r-- | lib/yahns/openssl_client.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb index cd7d210..f896acd 100644 --- a/lib/yahns/openssl_client.rb +++ b/lib/yahns/openssl_client.rb @@ -93,6 +93,10 @@ module Yahns::OpenSSLClient # :nodoc: rv end + def shutdown # we never call this with a how=SHUT_* arg + @ssl.sysclose + end + def close @ssl.close # flushes SSLSocket super # IO#close |