Hi all,

For asyncio_redis, tumb1er posted an issue that create_connection could 
block forever.

First he proposed to wrap create_connection into wait_for with a timeout=1 
parameter, but that would leave the file descriptor open that was created 
in BaseEventLoop.create_connection().  Therefore he proposes to create the 
socket ourself, using sock_connect , and if that fails due to a timeout, 
call sock.close manually.

You can find the issue 
here: https://github.com/jonathanslenders/asyncio-redis/issues/29

I'm not sure whether I understand this correctly. How is it possible that 
loop.create_connection blocks? Doesn't it just fail after a while if the 
host is not reachable? How are other libraries handling this? I don't like 
to copy paste much of the asyncio code to solve this issue, especially 
because it's something not directly related to asyncio_redis, but something 
that would apply to other libraries as well.


Jonathan.

Reply via email to