diff --git a/src/internal.c b/src/internal.c index fe678a480..60ffc5ded 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5108,7 +5108,7 @@ static int DoUserAuthRequestPassword(WOLFSSH* ssh, WS_UserAuthData* authData, if (authFailure || partialSuccess) { ret = SendUserAuthFailure(ssh, partialSuccess); } - else { + else if (ret == WS_SUCCESS) { ssh->clientState = CLIENT_USERAUTH_DONE; }