Thomas Wolf created SSHD-1224:
---------------------------------

             Summary: MissingAttachedSessionException: underlying cause gets 
lost; should be reported to client code
                 Key: SSHD-1224
                 URL: https://issues.apache.org/jira/browse/SSHD-1224
             Project: MINA SSHD
          Issue Type: Improvement
    Affects Versions: 2.7.0
            Reporter: Thomas Wolf


Follow-up on SSHD-1223: when a connection dies very early in the SSH session 
creation process (basically, while we're still setting up the IOSession for it, 
i.e., when sending the identification string fails), we may end up with an 
IOSession  that gets closed twice. But the second time there is no SSH session 
attached to the IOSession anymore, and as a result that second close attempt 
results in the user-facing ConnectFuture reporting a 
MissingAttachedSessionException. The underlying IOException ("Broken pipe") is 
lost, however, and is logged only.

This should be improved such that the IOE is reported through the ConnectFuture.

Part of the problem is that the ClientSessionImpl constructor already tries to 
send messages. Which is inconvenient anyway, since it complicates matters quite 
a bit if client code would need to configure something on the just created 
client session before sending any messages (for instance, for setting up some 
properties needed for connecting though a SOCK proxy first before actually 
starting the SSH protocol).

I didn't analyze whether a similar problem also exists for the server sessions; 
they also send the identification string in the constructor. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to