about summary refs log tree commit homepage
path: root/lib/yahns/openssl_client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/openssl_client.rb')
-rw-r--r--lib/yahns/openssl_client.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb
index c090083..d3caacb 100644
--- a/lib/yahns/openssl_client.rb
+++ b/lib/yahns/openssl_client.rb
@@ -93,10 +93,7 @@ module Yahns::OpenSSLClient # :nodoc:
 
     case buf = @ssl_blocked
     when nil
-      count = 0x4000 if count > 0x4000
-      buf = Thread.current[:yahns_sfbuf] ||= ''.dup
-      io.pos = offset
-      buf = io.read(count, buf) or return # nil for EOF
+      buf = do_pread(io, count, offset) or return # nil for EOF
       buf = @ssl_blocked = buf.dup
     when Exception
       raise buf