ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [01/23] incubator-ignite git commit: # sprint-1: Added check + log error if server failed to send responce to client.
Date Sat, 14 Feb 2015 12:22:53 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-250 ee27d241c -> c1ac729ce


# sprint-1: Added check + log error if server failed to send responce to client.


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

Branch: refs/heads/ignite-250
Commit: 09ff25c4692147c53612d804593f5eca01517c55
Parents: bdb5ded
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Sat Feb 14 16:37:13 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Sat Feb 14 16:37:13 2015 +0700

----------------------------------------------------------------------
 .../rest/protocols/tcp/GridTcpRestNioListener.java  | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/09ff25c4/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
index 17512ec..52b3123 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/GridTcpRestNioListener.java
@@ -202,9 +202,19 @@ public class GridTcpRestNioListener extends GridNioServerListenerAdapter<GridCli
                                 res.errorMessage("Failed to process client request: " + e.getMessage());
                             }
 
-                            ses.send(res);
-                        }
-                    });
+                            GridNioFuture<?> sf = ses.send(res);
+
+                            // Check if send failed.
+                            if (sf.isDone())
+                                try {
+                                    sf.get();
+                                }
+                                catch (Exception e) {
+                                    U.error(log, "Failed to process client request [ses="
+ ses + ", msg=" + msg + ']',
+                                        e);
+                                }
+                    }
+            });
                 else
                     U.error(log, "Failed to process client request (unknown packet type)
[ses=" + ses +
                         ", msg=" + msg + ']');


Mime
View raw message