sshd-core/src/main/java/org/apache/sshd/common/forward/TcpipClientChannel.java [167:185]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                protected CloseFuture doCloseGracefully() {
                    DefaultCloseFuture result = new DefaultCloseFuture(getChannelId(), futureLock);
                    CloseFuture packetsWritten = super.doCloseGracefully();
                    packetsWritten.addListener(p -> {
                        try {
                            // The channel writes EOF directly through the SSH session
                            IoWriteFuture eofSent = sendEof();
                            if (eofSent != null) {
                                eofSent.addListener(f -> result.setClosed());
                                return;
                            }
                        } catch (Exception e) {
                            getSession().exceptionCaught(e);
                        }
                        result.setClosed();
                    });
                    return result;
                }
            };
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sshd-core/src/main/java/org/apache/sshd/server/forward/TcpipServerChannel.java [202:220]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            protected CloseFuture doCloseGracefully() {
                DefaultCloseFuture result = new DefaultCloseFuture(getChannelId(), futureLock);
                CloseFuture packetsWritten = super.doCloseGracefully();
                packetsWritten.addListener(p -> {
                    try {
                        // The channel writes EOF directly through the SSH session
                        IoWriteFuture eofSent = sendEof();
                        if (eofSent != null) {
                            eofSent.addListener(f -> result.setClosed());
                            return;
                        }
                    } catch (Exception e) {
                        getSession().exceptionCaught(e);
                    }
                    result.setClosed();
                });
                return result;
            }
        };
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



