Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api): raise errors from modules disconnecting
When a module gets disconnected, the hardware controller cleans up the module instance, which stops the poller. What it doesn't do is cancel anything that was waiting on the next poll, or in fact prevent new things from waiting on the now-stopped poller. That means that if a module disconnects - During a module method waiting for the next poll, that module method hangs (well, awaits) forever - During a module method right _before_ waiting for the next poll, that module method would start waiting and continue waiting forever This PR forwards cancellations into the registered poll waiters when the poller task is cancelled, and prevents the registration of new poll waiters on a cancelled poll task.
- Loading branch information