gnodet commented on a change in pull request #166:
URL: https://github.com/apache/mina-sshd/pull/166#discussion_r488009388



##########
File path: 
sshd-core/src/main/java/org/apache/sshd/common/io/nio2/Nio2Session.java
##########
@@ -382,7 +385,36 @@ protected void handleReadCycleFailure(ByteBuffer buffer, 
Readable bufReader, Thr
         exceptionCaught(exc);
     }
 
+    @Override
+    public void suspendRead() {
+        log.debug("suspendRead({})", this);
+        suspendRead.set(true);
+    }
+
+    @Override
+    public void resumeRead() {
+        Runnable runnable = readRunnable.getAndSet(null);
+        if (runnable != null) {
+            log.debug("resumeRead({})", this);
+            suspendRead.set(false);

Review comment:
       I don't think this will change the behavior, but it will be cleaner.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to