Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3787346

Browse files
committed
patch for improved buffered input
1 parent 7a974f9 commit 3787346

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/meetup/memcached/SockIOPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ public SockIO( SockIOPool pool, String host, int port, int timeout, int connectT
15561556
sock.setTcpNoDelay( noDelay );
15571557

15581558
// wrap streams
1559-
in = new DataInputStream( sock.getInputStream() );
1559+
in = new DataInputStream( new BufferedInputStream( sock.getInputStream() ) );
15601560
out = new BufferedOutputStream( sock.getOutputStream() );
15611561

15621562
this.host = host + ":" + port;
@@ -1589,7 +1589,7 @@ public SockIO( SockIOPool pool, String host, int timeout, int connectTimeout, bo
15891589
sock.setTcpNoDelay( noDelay );
15901590

15911591
// wrap streams
1592-
in = new DataInputStream( sock.getInputStream() );
1592+
in = new DataInputStream( new BufferedInputStream( sock.getInputStream() ) );
15931593
out = new BufferedOutputStream( sock.getOutputStream() );
15941594

15951595
this.host = host;

0 commit comments

Comments
 (0)