diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 4773e304a8..33db6ade0e 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -199,6 +199,7 @@ Fixes ----- * Synchronization/cross thread visibility of variables #94 * Check channel state before calling Channel.close.syncUninterruptibly #113 +* Stop the HashedWheelTimer before shutting down EventLoopGroups #123 Other ------ diff --git a/src/main/java/com/lambdaworks/redis/AbstractRedisClient.java b/src/main/java/com/lambdaworks/redis/AbstractRedisClient.java index d8f3de0dd1..e30def9406 100644 --- a/src/main/java/com/lambdaworks/redis/AbstractRedisClient.java +++ b/src/main/java/com/lambdaworks/redis/AbstractRedisClient.java @@ -254,6 +254,8 @@ public void shutdown() { */ public void shutdown(long quietPeriod, long timeout, TimeUnit timeUnit) { + timer.stop(); + while (!closeableResources.isEmpty()) { Closeable closeableResource = closeableResources.iterator().next(); try { @@ -296,8 +298,6 @@ public void shutdown(long quietPeriod, long timeout, TimeUnit timeUnit) { throw new RedisException(e); } } - - timer.stop(); } protected int getResourceCount() {