DATAREDIS-257 - Shutdown the client when DefaultLettucePool is destroyed.
DefaultLettucePool manages a RedisClient instance that's created when afterPropertiesSet is called. The client was not being shutdown as part of the pool's destroy() processing leading to a resource leak. On OS X this would manifest itself as a growing number of kqueue file descriptors being consumed eventually leading to a failure when something tries to get a file descriptor and is unable to do so. This commit updates destroy() to call the client's shutdown() method. Original pull request: #26
This commit is contained in:
committed by
Thomas Darimont
parent
b5adde7430
commit
b99992a8f5
@@ -114,6 +114,7 @@ public class DefaultLettucePool implements LettucePool, InitializingBean {
|
||||
|
||||
public void destroy() {
|
||||
try {
|
||||
client.shutdown();
|
||||
internalPool.close();
|
||||
} catch (Exception e) {
|
||||
throw new PoolException("Could not destroy the pool", e);
|
||||
|
||||
Reference in New Issue
Block a user