[ 
https://issues.apache.org/jira/browse/SSHD-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17182715#comment-17182715
 ] 

Lyor Goldstein commented on SSHD-640:
-------------------------------------

I am not sure if this explains the issue, but I do see a problem - 
{{ShellImpl#destroy}} calls {{callback.onExit}} - the correct place for this 
call for this is when {{run()}} exits - either successfully (in which case 
recommend calling {{onExit(0)}}) or due to some error/exception - (in which 
case recommend calling {{onExit(non-zero)}}) - see example [this 
documentation|https://github.com/apache/mina-sshd/blob/master/docs/commands.md#remote-command-execution]

> Streams are not flushed from SSH Command
> ----------------------------------------
>
>                 Key: SSHD-640
>                 URL: https://issues.apache.org/jira/browse/SSHD-640
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Eugene Petrenko
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> I create a command with ordinary streams. In command implementation I create 
> thread, write several bytes from the tread to the OutputStream. And exit the 
> command. 
> The result is empty from client view. Adding explicit flush solves the issue. 
> I'd expect output streams are flushed implicitly before command end is sent 
> from a server to a client



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to