Closed chadrockey closed 9 months ago
Maybe your task DenonAVRTelnetApi._async_run_callbacks()
is garbage collected before it finishes when it runs for a long time (see here).
I'll check if it makes sense to register is as background tasks as the docs suggest. For the meantime, you could put your long running process in a task too and register it as a background task.
It seems like the timeout or a connection watchdog triggers while running other (potentially long delayed) async methods:
So for example, I set a script to:
connect to an AVR wait for notification of an input change (d.register_callback("SI", update_callback)) use python async streams (open_connection, etc for TCP) to send commands to another device wait a long time for the other device to process, execute, succeed, and then finally reply via TCP
I tried to do these back to back:
But this never really returned execution to denonavr and I saw errors similar to:
What seemed to resolve the issue for me was putting in little checkpoints where execution could continue in denonavr if required:
Not sure if it's relevant, but I have multiple callbacks registered, so it's possible for one to call on top, but the PW callback only prints, it doesn't kick off the other async calls.