Skip to content

Ping leaks a goroutine on every timeout #506

Description

@retr0h

Reviewer finding, not yet independently confirmed.

In internal/provider/network/ping/debian_do.go and darwin_do.go, pinger.Run() runs in a goroutine that sends on unbuffered result and error channels. When the context times out, Do returns and nothing receives, so the goroutine blocks forever once Run finishes.

Fix: buffer both channels with size 1, or select on a done channel before sending.


Found in the September 2026 codebase review. Tracked in the review tracking issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingkind/go

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions