Skip to content

Commit

Permalink
Merge pull request #880 from schanjr/master
Browse files Browse the repository at this point in the history
Increase readpartial() from 1KB to 16KB
  • Loading branch information
byroot committed Nov 6, 2019
2 parents d2763f2 + 8c9c4bc commit c7b69ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/redis/connection/ruby.rb
Expand Up @@ -53,7 +53,7 @@ def gets
crlf = nil

while (crlf = @buffer.index(CRLF)) == nil
@buffer << _read_from_socket(1024)
@buffer << _read_from_socket(16384)
end

@buffer.slice!(0, crlf + CRLF.bytesize)
Expand Down Expand Up @@ -354,8 +354,8 @@ def get_tcp_keepalive

# disables Nagle's Algorithm, prevents multiple round trips with MULTI
if [:IPPROTO_TCP, :TCP_NODELAY].all?{|c| Socket.const_defined? c}
def set_tcp_nodelay
@sock.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
def set_tcp_nodelay
@sock.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
end
else
def set_tcp_nodelay
Expand Down

0 comments on commit c7b69ba

Please sign in to comment.