redis-rb / redis-client

Simple low level client for Redis 6+
MIT License
124 stars 60 forks source link

close socket #148

Closed dpep closed 11 months ago

dpep commented 11 months ago

If an error occurs during client connection, but after the socket is opened, isn't there a chance the socket could be left open?

byroot commented 11 months ago

Not really because Ruby IOs are closed when they are garbage collected. But on some environments it may take a while for the GC to happens, so yeah, doesn't hurt to eagerly close.