Skip to content

Superflous error log when ending join session on the initiator #1162

Description

@roosterfish

When ending the join session/discovery during a MicroCloud deployment, the initiator looks to be logging the following error message which seems superflous and is most likely caused by some component closing the multicast responder beforehand:

2025-12-16T11:56:18Z microcloud.daemon[170444]: time="2025-12-16T11:56:18Z" level=error msg="Failed to close network endpoint after context got cancelled" err="close udp4 0.0.0.0:9444: use of closed network connection"

The discovery already has a (d *Discovery) StopResponder() which is invoked as part of stopping the multicast responder so likely we are just trying to close it a second time which then causes this error as the responder is already closed.

It should be tested if we require the additional Close() when the discovery responder's context is cancelled or if we can just skip it or just perform the Close() if it is still running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugConfirmed to be a bugJiraAllows the synchronization of a GitHub issue in Jira

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions