I/O exceptions can happen

This commit is contained in:
M66B 2022-06-08 16:24:39 +02:00
parent d2d6ac8ab6
commit beb1ce0e05
1 changed files with 5 additions and 0 deletions

View File

@ -486,10 +486,15 @@ class Protocol {
doAuth(host, authzid, user, passwd);
} catch (IOException ex) { // should never happen, ignore
logger.log(Level.FINE, "AUTH " + mech + " failed", ex);
thrown = ex;
} catch (Throwable t) { // crypto can't be initialized?
logger.log(Level.FINE, "AUTH " + mech + " failed", t);
thrown = t;
} finally {
if (thrown instanceof IOException) {
close();
throw (IOException) thrown;
}
if (noauthdebug && isTracing())
logger.fine("AUTH " + mech + " " +
(resp.ok ? "succeeded" : "failed"));