Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnRecvError timeout errors #105

Open
pkpowell opened this issue May 15, 2024 · 3 comments
Open

OnRecvError timeout errors #105

pkpowell opened this issue May 15, 2024 · 3 comments

Comments

@pkpowell
Copy link

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()

@alexsuhor
Copy link

Same issue go version go1.22.4 linux/amd6 Arch Linux

@gtlions
Copy link

gtlions commented Aug 14, 2024

Same issue go version go1.23rc2 linux/amd64 CentOS 7.

@joaodanilo123
Copy link

joaodanilo123 commented Aug 28, 2024

Same issue go version go1.23.0 linux/amd64 Fedora 40

the same problem occurs with both privileged and not-privileged pings. I just want to know if this is something to worry about. Even running the example code on the repo(but defining the pinger.OnRecvError function) causes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants