Description
Bug Report
Current behavior
I only verified this behaviour when running the arduino-cli
in daemon
mode.
It probably happens also when running a CLI command but it should not affect the end user in that case since the discovery processes would quit in any case.
This line returns an error
so the CLI doesn't consider the discovery process to be closed.
This prevents the quit
message to be sent to any client listening for boards connection and disconnection event, so these client won't know they must restart the board list watch process and listen from a new communication channel, thus the clients won't see any more events.
The quit
message has been added with #1460.
Expected behavior
I expect the discovery process to be killed only if it's still running.
Environment
- CLI version (output of
arduino-cli version
):0.20.2
- OS and platform: Windows
Additional context
My guess is that it's failing because the process we're trying to kill already has quit, we should probably only kill it if it's still running.