AscendingCreations / RedisPool

A redis pool for redis-rs
Apache License 2.0
12 stars 3 forks source link

Pubsub/Monitor support #5

Closed wilgaboury closed 1 year ago

wilgaboury commented 1 year ago

Don't merge this PR just yet, I realized that monitors cannot be turned back into a connection, so it's drop function is actually causing an async infinite loop.

I don' think there's a good reason to support Monitor in that case because once turned into one the connection cannot be returned to the pool.

genusistimelord commented 1 year ago

yeah that is why I said Monitor will need to be treated as if the connection never really existed to the pool. So a Get_monitor where it gets a connection without creating anything for the pool probably would be better.

wilgaboury commented 1 year ago

I added a factory function to the pool so that users can access the underlying client without having to go through the pool, which should cover that use case.

genusistimelord commented 1 year ago

So was that able to fix the monitor issue?

wilgaboury commented 1 year ago

Yup should be okay to merge as long as you think the changes look good.