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

Guillaume Nodet commented on SSHD-720:
--------------------------------------

There's no way the client code can guarantee that the server connection will 
not close between the call to {{session.isOpen()}} and 
{{session.createChannel()}}.  The socket and the session can be shut down at 
any time.
So while checking {{isOpen}} can avoid some problems, you code needs to be 
prepared to receive an exception whenever the client will access the socket.  
You can also be notified when the session is closed by using a 
{{SessionListener}}.

> SSHD does not always detect remote closure in time.
> ---------------------------------------------------
>
>                 Key: SSHD-720
>                 URL: https://issues.apache.org/jira/browse/SSHD-720
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Claude Warren
>            Priority: Minor
>         Attachments: CommsTest2.java, CommsTest2a.java
>
>
> I am attempting to use a device that will close the connection if there are 
> any invalid commands.  The client side does not detect this condition and I 
> don't see any way to check for it.
> Example code is attached



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

Reply via email to