Closed stefanwille closed 6 years ago
@kostya thank you. I don't see that this is necessary for the reason stated above.
i think this is possible to remove nilable values fully. just initialize in initialize and reinitialize in reconnect. to avoid @connection.not_nil!
which is pretty not safe.
Wanting the option to make the connection nilable was the reason for you to introduce the @client
attribute and the Redis::Client
class, if I am not mistaken? That role has @connection
now.
What is your idea?
you use not_nil! which is pretty not safe, i suggest fix in https://github.com/stefanwille/crystal-redis/pull/63#issuecomment-399371458
i suggest such diff to fix all of this, and remove not_nil! at all (but with client it seems it was simpler):