Make sure the Redis connection is closed

@pk11 The connection to Redis was not being closed, which caused runaway connections (and threads); eventually leading to an OOM exception.