Skip to content

Commit 845e65a

Browse files
committed
ssl: allow underlying socket to not implement #sync
The value is used to determine whether SSLSocket should skip buffering in OpenSSL::Buffering or not. Defaulting to true (no buffering) should be a safe option.
1 parent 890f8bf commit 845e65a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/openssl/buffering.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def initialize(*)
6060
super
6161
@eof = false
6262
@rbuffer = Buffer.new
63-
@sync = @io.sync
63+
@sync = @io.respond_to?(:sync) ? @io.sync : true
6464
end
6565

6666
#

0 commit comments

Comments
 (0)