Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loop over a mutable dict during BGAPI shutdown #316

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

peplin
Copy link
Owner

@peplin peplin commented Feb 21, 2021

This fixes a RuntimeError reported in #306.

There's a circular dependency between the backend and device classes.
When stopping the BGAPI backend, we call disconnect on each device.
When a disconnection event is received from the BLED112 adapter, the
device is removed from self._connections - the same dict we are
iterating over.

This fixes a RuntimeError reported in #306.

There's a circular dependency between the backend and device classes.
When stopping the BGAPI backend, we call `disconnect` on each device.
When a disconnection event is received from the BLED112 adapter, the
device is removed from `self._connections` - the same dict we are
iterating over.
@peplin peplin merged commit e51d92a into master Feb 21, 2021
@peplin peplin deleted the removed-while-disconnect branch April 28, 2021 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant