Skip to content

More robust radio bridge connection #16

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

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

microbit-robert
Copy link
Contributor

Only reconnect serial session on tab change if consumer is already listening.

Only reconnect serial session on tab change if consumer is already
listening.
Comment on lines +152 to +153
if (--this.addedListeners[type] <= 0) {
this.addedListeners[type] = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could better manage our own callers as well. Continually clicking disconnect got us into negative numbers.

Comment on lines +104 to +106
if (this.disconnectPromise) {
await this.disconnectPromise;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed I'll replace this with a generic async state change queue.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit bff05d7 into main Jul 25, 2024
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the robust-radio branch July 25, 2024 15:46
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.

2 participants