Use read_nonblock instead of readpartial to account for SSL socket buffer
diff --git a/lib/rb/benchmark/client.rb b/lib/rb/benchmark/client.rb
index 304e6d8..2b892c8 100644
--- a/lib/rb/benchmark/client.rb
+++ b/lib/rb/benchmark/client.rb
@@ -72,9 +72,9 @@
ctx.key = OpenSSL::PKey::RSA.new(File.open(File.join(keys_dir, "client.key")))
end
- Thrift::SSLSocket.new(@host, @port, nil, ssl_context)
+ Thrift::SSLSocket.new(@host, @port, 5, ssl_context)
else
- Thrift::Socket.new(@host, @port)
+ Thrift::Socket.new(@host, @port, 5)
end
protocol = create_protocol(socket)
transport = protocol.trans