lgoldstein commented on a change in pull request #156:
URL: https://github.com/apache/mina-sshd/pull/156#discussion_r465005694



##########
File path: 
sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionImpl.java
##########
@@ -124,8 +123,19 @@ public AuthFuture auth() throws IOException {
         ClientUserAuthService authService = getUserAuthService();
         synchronized (sessionLock) {
             String serviceName = nextServiceName();
+            // SSHD-1050 - check if need to propagate any previously caught 
exceptions
+            Throwable caught = (authFuture instanceof InitialAuthFuture) ? 
authFuture.getException() : null;
             authFuture = ValidateUtils.checkNotNull(
                     authService.auth(serviceName), "No auth future generated 
by service=%s", serviceName);
+            if (caught != null) {
+                /*
+                 * Safe to do under session lock despite SSHD-916 since
+                 * the newly generated future has no associated listeners
+                 * attached to it yet
+                 */
+                signalAuthFailure(authFuture, caught);

Review comment:
       Seems a good idea...




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to