summaryrefslogtreecommitdiff
path: root/ext/openssl/lib/openssl/buffering.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/lib/openssl/buffering.rb')
-rw-r--r--ext/openssl/lib/openssl/buffering.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index f07e5bc4c16..6ddec099bf6 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/lib/openssl/buffering.rb
@@ -16,7 +16,7 @@
module Buffering
include Enumerable
- attr_accessor :sync
+ attr_accessor :sync, :sync_close
BLOCK_SIZE = 1024*16
#
@@ -185,5 +185,7 @@ module Buffering
def close
flush
sysclose
+ @sync_close ||= false
+ @io.close if @sync_close
end
end