Github user kevinxu021 commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1427#discussion_r172736542
--- Diff:
dcs/src/main/java/org/trafodion/dcs/master/listener/ListenerService.java ---
@@ -263,14 +264,20 @@ else if ((key.interestOps() & SelectionKey.OP_WRITE)
== SelectionKey.OP_WRITE) {
}
}
}
+ if (this.isInterrupted()) {
+ throw new InterruptedException();
+ }
//gc();
}
+ } catch (InterruptedException e) {
} catch (IOException e) {
LOG.error(e);
System.exit(1);
} finally {
+ LOG.info("close ServerSocketChannel...");
if (server != null) {
try {
+ server.socket().close();
server.close();
} catch (IOException e) {
e.printStackTrace();
--- End diff --
it's better to print the message into log file.
---