rasky/geventconnpool

Is the keepalive fired per connection?

rdrey opened this issue · 3 comments

rdrey commented

I had just a quick look at the code, so I could be reading it wrong, but it looks like it just sends a keepalive for one of the connections in the pool per interval. Could you fix it?

rdrey commented

I would be happy to contribute a PR, too. For my use case at least the keepalive timer can be reset every time a message was successfully sent/received.

rasky commented

The keepalive is sent to all connections in the pool. The contextmanager is written to rotate among them, which is a good thing even for normal usage (in addition to keepalive

rdrey commented

Ah, I didn't spot this. Yeah, it's good enough for me. 👍

    delay = float(self.keepalive) / self.size