You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
If the connection with Redis is lost while the program is awaiting for xread() it get stuck until the connection is reestablished.
It doesn't raise any Exception, or at least timeout after the block time.
If I wrap xread() with asyncio.wait_for(), and force a disconnection, the wait_for() timeouts correctly, and the subsequent xread() calls raise ConnectionError. So it confirms that the bug only happens if the code is awaiting xread() when the disconnection occurs.
To Reproduce
You need a running Redis with a stream with entries
Set correct values for redis_dsn and stream. Then run:
The logs should be displayed as the entries are read.
Force a disconnection, such as stopping the Redis.
You should see that the logs have stopped and no exception is logged.
[Optional] If you force a reconnection, the program should resume so it start to display the logs again.
Expected behavior
After running the snippet, you should see the logs been displayed rapidly. After the disconnection the program will halt, so the logs will also stop, and no exception is raised.
Logs/tracebacks
It's not applicable.
Python Version
Python 3.8.10
aioredis Version
aioredis 2.0.0
Additional context
No response
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Describe the bug
If the connection with Redis is lost while the program is awaiting for
xread()
it get stuck until the connection is reestablished.It doesn't raise any Exception, or at least timeout after the
block
time.If I wrap
xread()
withasyncio.wait_for()
, and force a disconnection, thewait_for()
timeouts correctly, and the subsequentxread()
calls raise ConnectionError. So it confirms that the bug only happens if the code is awaitingxread()
when the disconnection occurs.To Reproduce
redis_dsn
andstream
. Then run:Expected behavior
After running the snippet, you should see the logs been displayed rapidly. After the disconnection the program will halt, so the logs will also stop, and no exception is raised.
Logs/tracebacks
Python Version
Python 3.8.10
aioredis Version
aioredis 2.0.0
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: