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

Shashank commented on SSHD-108:
-------------------------------

Hi [~lgoldstein],

Thanks for you time.

I did further analysis on this and observed that in Nio2Session (startReading() 
and startWriting() methods) whenever a session gets closed in middle of a 
transfer, IOException (An existing connection was forcibly closed by the remote 
host) is being raised and onFailed() is being invoked.

In this particular case, by having a new boolean variable in Nio2Session to 
indicate transfer abort. Something similar to isClosing() and isClosed() 
mehtods. Could you please provide your thoughts on this?

> Add upload monitoring to sftp
> -----------------------------
>
>                 Key: SSHD-108
>                 URL: https://issues.apache.org/jira/browse/SSHD-108
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Richard Evans
>            Assignee: Goldstein Lyor
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> We have sshd integrated into our application and sftp is working fine.  One 
> of the requirements is to initiate some action when a file upload it 
> complete.  I have made this work by implementing handleClose in my SshFile 
> implementation and performing the action if createOutputStream had been 
> called previously.  This seems a bit ugly though; it might be nicer if there 
> was some plug in mechanism to monitor file transfers.
> Ideally the monitor would be able to distinguish between a successful upload 
> and a cancelled one (via ctrl-c at the client), but a quick perusal of the 
> sftp stuff seems to inidicate that this is not possible. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to