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 a bug where we were unnecessarily calling manualDisconnect #6700

Closed
wants to merge 1 commit into from

Conversation

kenzieschmoll
Copy link
Member

@kenzieschmoll kenzieschmoll commented Nov 9, 2023

Found an issue while investigating Dart-Code/Dart-Code#4832 (comment). We do not need to perform a disconnect if there is not already an existing connection.

@kenzieschmoll kenzieschmoll requested a review from a team as a code owner November 9, 2023 19:15
@kenzieschmoll kenzieschmoll requested review from CoderDake and DanTup and removed request for a team November 9, 2023 19:15
Comment on lines +63 to +65
if (serviceConnection.serviceManager.hasConnection) {
await serviceConnection.serviceManager.manuallyDisconnect();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too familiar with this, but is it possible we'd have a race here if there is a connection in progress (hasConnection being false so we skip this, but a connection ends up being formed shortly after?)

(if it is possible, I don't know if calling manuallyDisconnect() is the right thing to do to cancel that anyway, so it might be an unrelated issue if there is such an issue)

@kenzieschmoll
Copy link
Member Author

closing this for now since Dart-Code/Dart-Code#4832 has been resolved. If this is causing other issues we can investigate then.

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