Skip to content

Discovery cleanup #1181

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

Closed

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Jul 13, 2022

Motivation

This is another variant of #1167.

There is a bug with #1167 that can be reproduced on my Windows machine with the following steps:

  • IDE2 is up and running, a board is connected and recognized by IDE2; it's the selected board,
  • Stop IDE2,
  • Start IDE2 (You can see the board is connected from the dropdown),
  • Disconnect the board when the Downloading .... notification message (this is when IDE2 initializes the core client),
  • Core client reinitialization is done, the board is not connected, but IDE2 still shows it as a connected board.

This PR fixes this issue, but IDE2 must stop the board discovery before re-initializing the core client and restarting after it. WheIDE2 stops the board discoveryE2 before the re-init; zero available board and ports must be broadcasted to the frontends. So users will see a disconnect/reconnect board before/after the index update and the core client re-init.

See it in action:

stop-discovery-during-client-reinit.mp4

Change description

Other information

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Akos Kitta added 2 commits July 13, 2022 15:23
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos requested a review from per1234 July 13, 2022 14:55
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 14, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

No matter what sort of rude user behavior I throw at the IDE, the discovery has worked perfectly 100% of the time during my tests of this PR.

However, I am not confident that I have effectively verified the bug fix this is intended to provide because I was able to reproduce it only very rarely with the build for #1167.

@kittaakos
Copy link
Contributor Author

Follow-up: #1186

@per1234 per1234 added the conclusion: declined Will not be worked on label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: declined Will not be worked on topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants