#2300 Change EV server to use python-redis instead of trollius-redis to correctly clean up connections
Merged by pingou. Opened by puiterwijk.
puiterwijk/pagure evfixes  into  2.9.x

Download 2300.patch

Use python-redis instead of trollius-redis to correctly clean up when client leaves

With trollius-redis, the connection is not released when the client disconnects unless
someone comments on the issue/PR they had open, because unless something happened on
the issue they had open, we did not actually send anything to the client.
As a result, we were not aware whether the client was still connected.
With python-redis, we just check every so often if there's a message, and if not we
at least try to send a ping to the client every 5 seconds.
Trying to send data will cause an BrokenPipeError if the client is gone, and thus
we can correctly clean up.
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>

this will be incompatible in Fedora

It's not. This works just fine on Fedora 24, 25 and rawhide.

Sad that trollius-redis doesn't allow this directly, but ok :)

Metadata