Skip to content

Commit

Permalink
[irods-contrib/metalnx-web#133] disconnect from protocol when Invalid…
Browse files Browse the repository at this point in the history
…UserException is encountered
  • Loading branch information
JustinKyleJames committed Feb 11, 2025
1 parent ac1c4df commit 5d87e61
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package org.irods.jargon.core.connection;

import org.irods.jargon.core.exception.AuthenticationException;
import org.irods.jargon.core.exception.InvalidUserException;
import org.irods.jargon.core.exception.JargonException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -95,12 +96,11 @@ protected IRODSMidLevelProtocol instance(final IRODSSession irodsSession, final
protocol = authenticate(protocol, irodsAccount, irodsSession, irodsProtocolManager);
log.debug("..authenticated...now decorate and return...");
return decorate(protocol, irodsAccount, irodsSession);
} catch (AuthenticationException e) {
} catch (InvalidUserException | AuthenticationException e) {
log.warn("auth failure, be sure to abandon agent)", e);
protocol.disconnectWithForce();
throw e;
}

}
}

/**
Expand Down

0 comments on commit 5d87e61

Please sign in to comment.