ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [08/43] ignite git commit: Tcp discovery minor: create buffered input stream with size = socket receiveBufferSize.
Date Fri, 17 Jun 2016 12:38:37 GMT
Tcp discovery minor: create buffered input stream with size = socket receiveBufferSize.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/54425bf3
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/54425bf3
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/54425bf3

Branch: refs/heads/ignite-3335
Commit: 54425bf3e4b92c99feb3be1fd697ec5e93f9e456
Parents: 6625e01
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Jun 14 11:42:52 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Jun 14 11:43:20 2016 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/54425bf3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index b7814e5..2ce2e7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -5180,7 +5180,9 @@ class ServerImpl extends TcpDiscoveryImpl {
                     for (IgniteInClosure<Socket> connLsnr : spi.incomeConnLsnrs)
                         connLsnr.apply(sock);
 
-                    in = new BufferedInputStream(sock.getInputStream());
+                    int rcvBufSize = sock.getReceiveBufferSize();
+
+                    in = new BufferedInputStream(sock.getInputStream(), rcvBufSize > 0
? rcvBufSize : 8192);
 
                     byte[] buf = new byte[4];
                     int read = 0;


Mime
View raw message