ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [ignite] branch master updated: IGNITE-12845 Fix GridNioServer events lost - Fixes #7879.
Date Thu, 02 Jul 2020 10:41:24 GMT
This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new dc3ddf0  IGNITE-12845 Fix GridNioServer events lost - Fixes #7879.
dc3ddf0 is described below

commit dc3ddf086dde8e1d1f613270b778419735bb9648
Author: Aleksey Plekhanov <plehanov.alex@gmail.com>
AuthorDate: Thu Jul 2 15:38:20 2020 +0500

    IGNITE-12845 Fix GridNioServer events lost - Fixes #7879.
    
    Signed-off-by: Aleksey Plekhanov <plehanov.alex@gmail.com>
---
 .../org/apache/ignite/internal/util/nio/GridNioServer.java     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

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 6686f5e..21e51b5 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
@@ -1072,15 +1072,11 @@ public class GridNioServer<T> {
      * Stop polling for write availability if write queue is empty.
      */
     private void stopPollingForWrite(SelectionKey key, GridSelectorNioSessionImpl ses) {
-        if (ses.procWrite.get()) {
+        if (ses.writeQueue().isEmpty()) {
             ses.procWrite.set(false);
 
-            if (ses.writeQueue().isEmpty()) {
-                if ((key.interestOps() & SelectionKey.OP_WRITE) != 0)
-                    key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
-            }
-            else
-                ses.procWrite.set(true);
+            if ((key.interestOps() & SelectionKey.OP_WRITE) != 0)
+                key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
         }
     }
 


Mime
View raw message