Skip to content

OnRecvError timeout errors #105

@pkpowell

Description

@pkpowell

As soon as I add OnRecvError I get heaps of timeout errors (20+ errs / s )
read ip 0.0.0.0: raw-read ip4 0.0.0.0: i/o timeout
The pings themselves seem to work as expected.

Here's the pro-bing code. Am I doing something wrong?
This happens on macOS 13, 14, amd64/arm64, golang go1.22.2/3

	t.Pinger, err = probing.NewPinger(t.Address)
	if err != nil {
		Errorf("probing.NewPinger error %s", err)
		return
	}
	t.Pinger.SetPrivileged(true)
	t.Pinger.Size = t.Size
	t.Pinger.Interval = time.Second * time.Duration(t.Freq)

	t.Pinger.OnRecvError = func(err error) {
		Errorf("OnRecvError %s", err)
	}

	t.Pinger.OnSendError = func(pkt *probing.Packet, err error) {
		Errorf("OnSendError %s", err)
	}

	t.Pinger.OnDuplicateRecv = func(pkt *probing.Packet) {
		Errorf("OnDuplicateRecv %v", pkt)
	}

	t.Pinger.OnRecv = func(pkt *probing.Packet) {
		...
	}
	err = t.Pinger.Run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions