[ https://issues.apache.org/jira/browse/SSHD-964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027031#comment-17027031
]
Lyor Goldstein commented on SSHD-964:
-------------------------------------
Hi [~roberto.deandrea] sorry to bother you, but after reviewing the code for {{sendEof}} I
decided to make a slight adjustment to it - basically bypass the regular {{writePacket}} which
I reverted to allow sending channel messages only if channel is open (see below). I am sure
it did not damage this issue's functionality, but I would feel better if you would be so kind
as to run a sanity test on it from your part.
Thanks
{code:java}
protected ... sendEof() {
Session s = getSession();
Buffer buffer = s.createBuffer(SshConstants.SSH_MSG_CHANNEL_EOF, Short.SIZE);
buffer.putInt(getRecipient());
/*
* The default "writePacket" does not send packets if state
* is not open so we need to bypass it.
*/
return s.writePacket(buffer);
}
@Override
public IoWriteFuture writePacket(Buffer buffer) throws IOException {
if (!isClosing()) {
Session s = getSession();
return s.writePacket(buffer);
}
if (log.isDebugEnabled()) {
log.debug("writePacket({}) Discarding output packet because channel state={}",
this, state);
}
return new AbstractIoWriteFuture(toString(), null) {
{
setValue(new EOFException("Channel is being closed"));
}
};
}
{code}
> SSH_MSG_CHANNEL_EOF never sent or received for local and remote port forwarding
> -------------------------------------------------------------------------------
>
> Key: SSHD-964
> URL: https://issues.apache.org/jira/browse/SSHD-964
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 2.3.0, 2.3.1
> Reporter: Roberto Deandrea
> Assignee: Lyor Goldstein
> Priority: Major
>
> We found that the message SSH_MSG_CHANNEL_EOF is never sent or received for local and
remote port forwarding connections.
> We found probably the issue and we changed the code locally in a couple of java classes
to fix this issue.
> Let me know if we can commit our changes in a pull request (into a specific Apache SSHD
branch) so that you can peer review the changes and decide if you can accept them...
>
> Kind Regards
> Roberto Deandrea
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org
|