adilbaig/Tiny-Redis

Is there any way to close a redis connection?

Closed this issue · 4 comments

I can't see it in the docs. Just wondering is this can be an issue.

Makes sense. Was just a bit worried, thinking like Postgres user. However, sounds good.

BTW, if the redis server restarts or stops half way through a process while a tinyredis connection is open, what happens? Just throws an error?

Yes, throws an Exception.

This design is a bit dated, I don't like the fact that the connection is managed inside the object, it really should be passed outside in so disconnects can be handled properly in userland code.

Given that, an improvement would be to use UFCS style functions on a generic TCPSocket. The code would "look" the same, but you'd have access to all Socket methods.

Well, I think this is okay for now. Thanks for the info. I'll close this thread.