Skip to content

network discoverable board persist for 60 second after disconnection #3109

Description

@lucarin91

Describe the problem

Running a board list with watch mode will show a disconnected network board for around 60 seconds.

It seems that there is a 60-second cache in the mdns-discovery that makes the board also show if not available anymore, i.e., code ref.
This is misleading to the user, who thinks it can be connected, but the board isn't really there.

Not sure the reason for that cache, but I think maybe it could be reduced or using another approach to see if the board is still available, like regularly ping it?

To reproduce

Connect a network discoverable board, e.g., UNO Q, to the local network.

Start the discovery in watch mode

arduino-cli board list -w

Poweroff the board, you will see the board for 60 seconds.

Expected behavior

With some delay (a couple of seconds), the board should disappear.

Arduino CLI version

1.4.1

Operating system

macOS

Operating system version

26.2

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions