-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Increase ping timeout based on ping count and interval #1305
Conversation
seems more like user-error to me, why don't you just increase the timeout? I'd prefer the plugin to behave the same as the |
The timeout parameter is used both for the -W argument in ping (a per-ping timeout, "time to wait for a response" from the man pages) and the total ping command exec timeout (via internal.CombinedOutputTimeout()). You can reproduce the bug by passing in the following parameters: count = 4 It will fail due to "Command timed out." The corresponding ping command does not time out when sent from a terminal: |
Timeout should be one "-W timeout" per count, plus one interval between each count.
hmm I see. I think that this plugin was meant to be using the |
I see that some checks failed (maybe just formatting-related?). Could I defer any further changes to you? Regarding -w vs -W, either approach is fine. If you decide to use -w, could you add a comment on the sample config or the type definition? Thank you! |
could you just run |
closing for #1359 |
This should fix a bug where the ping command will time out when specifying ping count > 1 with a long interval. Feel free to rewrite and/or add tests if necessary.