Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
panxiaojun233 committed Jan 18, 2021
1 parent 7fc0d46 commit 0c68ca4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@ public void operationComplete(final Future future) throws Exception {
}
System.out.println("shut operationComplete..");
long now = System.currentTimeMillis();
while (now - start > 15000 || channelGroup.size() > 0) {
while (now - start <= 15000 || channelGroup.size() > 0) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
}
}
}).await();
}).await(15000);
System.out.println("close cost:" + (System.currentTimeMillis()-start));
} catch (InterruptedException e) {
System.out.println("Interrupted while shutting down" + e.getMessage());
logger.warn("Interrupted while shutting down", e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void secondGoAwayAndClose(ChannelHandlerContext ctx) {
ctx.write(goAwayFrame);
ctx.flush();
//gracefulShutdownTimeoutMillis
ctx.close();
//ctx.close();
} catch (Exception e) {
ctx.fireExceptionCaught(e);
}
Expand Down

0 comments on commit 0c68ca4

Please sign in to comment.