canonical / canonical/microcloud
Superflous error log when ending join session on the initiator
- Dominant language
- Go
- Stars
- 532
- Forks
- 83
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 36
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.