I have a uasyncio task running on an ESP8266 which sends DNS lookups (UDP). I'm using uasyncio.StreamReader (and writer) on the socket object to do this asynchronously. Most requests are successful, but sometimes the task indefinitely hangs on "await reader.read(128)", which is reading the response from the server. There's a timeout set on the socket.
I have a main() task with its own infinite loop, and I can see that when the DNS read gets stuck the main loop keeps running just fine.
If I press CTRL-C, I get:
Code: Select all
Traceback (most recent call last):
File "main.py", line 290, in <module>
File "uasyncio/core.py", line 1, in run
File "uasyncio/core.py", line 1, in run_until_complete
File "uasyncio/core.py", line 1, in wait_io_event
KeyboardInterrupt: