INT-1614 ignoring Exceptions upon closing the Session

This commit is contained in:
Mark Fisher
2010-11-19 20:17:17 -05:00
parent 0a6842dd7d
commit e18c5231c9

View File

@@ -91,7 +91,14 @@ public class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer
throw new MessagingException("couldn't synchronize remote to local directory", e);
}
finally {
session.close();
try {
session.close();
}
catch (Exception ignored) {
if (logger.isDebugEnabled()) {
logger.debug("failed to close Session", ignored);
}
}
if (logger.isTraceEnabled()) {
logger.trace("Putting SftpSession " + session + " back into the pool");
}