ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [23/39] incubator-ignite git commit: Decrease write buffer to avoid double sending.
Date Fri, 24 Jul 2015 17:22:46 GMT
Decrease write buffer to avoid double sending.


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

Branch: refs/heads/ignite-gg-10576
Commit: 65feef6d2d9bbe0ac19d1496f472c0ee06ef0b04
Parents: 6b84399
Author: nikolay_tikhonov <ntikhonov@gridgain.com>
Authored: Thu Jul 23 16:05:33 2015 +0300
Committer: nikolay_tikhonov <ntikhonov@gridgain.com>
Committed: Thu Jul 23 16:06:06 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/util/nio/GridNioServer.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/65feef6d/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index 24e1e08..d3f439a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -977,8 +977,14 @@ public class GridNioServer<T> {
 
                     buf = sslFilter.encrypt(ses, sesBuf);
 
+                    int expand = sesBuf.limit() - buf.limit();
+
                     sesBuf.clear();
 
+                    // SSL data more then socket buffer size
+                    if (expand < 0)
+                        sesBuf.limit(sesBuf.limit() + expand - 100);
+
                     assert buf.hasRemaining();
 
                     if (!skipWrite) {


Mime
View raw message