tomaswolf commented on code in PR #242:
URL: https://github.com/apache/mina-sshd/pull/242#discussion_r967243244
##########
sshd-core/src/main/java/org/apache/sshd/client/SshClient.java:
##########
@@ -586,9 +587,14 @@ protected ConnectFuture doConnect(
if (f5.isConnected()) {
ClientSession clientSession =
f5.getClientSession();
clientSession.setAttribute(TARGET_SERVER, address);
-
connectFuture.setSession(clientSession);
-
proxySession.addCloseFutureListener(f6 -> clientSession.close(true));
-
clientSession.addCloseFutureListener(f6 -> proxySession.close(true));
+ try {
+
setSessionSafely(connectFuture, clientSession);
+
proxySession.addCloseFutureListener(f6 -> clientSession.close(true));
+
clientSession.addCloseFutureListener(f6 -> proxySession.close(true));
Review Comment:
This isn't correct yet. If there is a timeout, the proxySession also needs
to be closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]