Skip to content

Commit

Permalink
Merge pull request #15 from weiyu2001/master
Browse files Browse the repository at this point in the history
shutdown the pool now to avoid delayed shutdownchannelgroupexception
  • Loading branch information
jefft0 committed May 31, 2016
2 parents 97edf51 + a712925 commit 655b732
Showing 1 changed file with 1 addition and 6 deletions.
Expand Up @@ -232,12 +232,7 @@ private AsyncTcpTransport createAndStartClient(ScheduledExecutorService pool) {
}

private void shutdownPool(ScheduledExecutorService pool) {
pool.shutdown();
try {
pool.awaitTermination(10, TimeUnit.SECONDS);
} catch (InterruptedException e) {
LOGGER.log(Level.WARNING, null, e);
}
pool.shutdownNow();
}

private void send(final ScheduledExecutorService pool, final AsyncTcpTransport transport, final String ping) {
Expand Down

0 comments on commit 655b732

Please sign in to comment.