Only log InterruptedException on debug level
@@ -364,14 +364,10 @@ public class ConsoleSessionImpl implements Session {
if (result != null) {
session.getConsole().println(session.format(result, Converter.INSPECT));
}
+ } catch (InterruptedException e) {
+ LOGGER.debug("Console session is closed");
} catch (Throwable t) {
- if (!(command.endsWith("logout") && t instanceof InterruptedException)) {
- //command logout will interrupt this seesion thread, so this exception
- //is expected, don't need log it as a error message
ShellUtil.logException(this, t);
- } else {
- LOGGER.debug("a console session is closed as the peer just logout");
- }
}
}
close();
