efegokdemir commented on code in PR #916:
URL: https://github.com/apache/mina-sshd/pull/916#discussion_r4107709776
##########
sshd-contrib/src/main/java/org/apache/sshd/contrib/common/io/EndlessWriteFuture.java:
##########
@@ -88,4 +89,19 @@ public boolean isWritten() {
public Throwable getException() {
return null;
}
+
Review Comment:
Addressed in 042bee93. EndlessWriteFuture now implements the required
setException(Throwable) method as a no-op because it intentionally never
completes. The PMD MissingOverride/compilation issue is resolved. Focused
validation passed: ./mvnw -pl sshd-core
-Dtest=Nio2ServiceTest,ChannelAsyncOutputStreamTest ... test (8 tests).
##########
sshd-common/src/main/java/org/apache/sshd/common/io/AbstractIoWriteFuture.java:
##########
@@ -24,21 +24,21 @@
import org.apache.sshd.common.SshException;
import org.apache.sshd.common.future.CancelOption;
-import org.apache.sshd.common.future.DefaultVerifiableSshFuture;
+import org.apache.sshd.common.future.DefaultCancellableSshFuture;
/**
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
*/
public abstract class AbstractIoWriteFuture
- extends DefaultVerifiableSshFuture<IoWriteFuture>
+ extends DefaultCancellableSshFuture<IoWriteFuture>
Review Comment:
Addressed in 042bee93. Since IoWriteFuture now inherits cancellation,
PendingWriteFuture and Nio2DefaultIoWriteFuture no longer override
setException; they use the cancellable base implementation. PendingWriteFuture
now propagates cancellation from its underlying write future instead of
converting it to a null exception. The existing channel and SFTP cancellation
tests remain green.
##########
sshd-common/src/main/java/org/apache/sshd/common/io/IoWriteFuture.java:
##########
@@ -18,11 +18,13 @@
*/
package org.apache.sshd.common.io;
+import org.apache.sshd.common.future.Cancellable;
import org.apache.sshd.common.future.HasException;
import org.apache.sshd.common.future.SshFuture;
import org.apache.sshd.common.future.VerifiableFuture;
-public interface IoWriteFuture extends HasException, SshFuture<IoWriteFuture>,
VerifiableFuture<IoWriteFuture> {
+public interface IoWriteFuture
+ extends HasException, Cancellable, SshFuture<IoWriteFuture>,
VerifiableFuture<IoWriteFuture> {
Review Comment:
Addressed in 042bee93. Nio2Session now removes canceled queued writes before
starting them and does not resume a canceled in-flight write after a partial
completion. Key-exchange flushing skips canceled PendingWriteFuture instances,
so cancellation cannot later enqueue the packet. The added Nio2ServiceTest
proves a canceled queued write never reaches the socket; the focused core suite
passed (8 tests). A full ./mvnw clean verify was run with JDK 17: 712 core
tests passed, but the local run stalled in the existing sshd-mina KeepAliveTest
before completing the reactor, so I am not claiming a full-build pass.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]