diff --git a/Sources/NIORedis/RedisClient.swift b/Sources/NIORedis/RedisClient.swift index 9bff4e2..fe78ec6 100644 --- a/Sources/NIORedis/RedisClient.swift +++ b/Sources/NIORedis/RedisClient.swift @@ -50,7 +50,10 @@ public final class RedisConnection: RedisClient { private var sentQuitCommand = Atomic(value: false) deinit { - assert(sentQuitCommand.load(), "RedisConnection did not properly shutdown before deinit!") + if !sentQuitCommand.load() { + assertionFailure("close() was not called before deinit!") + logger.warning("RedisConnection did not properly shutdown before deinit!") + } } /// Creates a new connection on the provided `Channel`.