Skip to content

Commit 2a83105

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 1eb4b57 commit 2a83105

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
@@ -64,7 +64,7 @@ def initialize(*)
6464
super
6565
@eof = false
6666
@rbuffer = Buffer.new
67-
@sync = @io.sync
67+
@sync = @io.respond_to?(:sync) ? @io.sync : true
6868
end
6969

7070
#

0 commit comments

Comments
 (0)