-
Notifications
You must be signed in to change notification settings - Fork 104
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
Misleading values in returned object when the cable is unplugged or the host doesn't exist #133
Comments
Since node-ping relies on underlying system command implementation, data
reflects what it can be fetch from the system's command.
In your case, since you have unplugged the cable before running probe, I
guess `ping` returns only error message about network device is gone or etc.
No hostname can be fetched as as result.
Actually, both cases fall into same fact that node-ping cannot fetch
messages from the underlying system command. We can do not much in this
scenario.
|
Ok that's totally fine. For me, it would be better to have the Thank you for your response and explanation. |
For your case, how about adding a key, say, Therefore, we have around 3 keys talking about hosts but with subtle difference:
Hopefully, it can address your issue |
You can checkout this new implementation in the master branch on github. |
I don't find this commit in the latest npm version v0.4.0 . Could you please check it, thanks a lot. |
as marked in #136, hopefully, I tag it wrongly. Try 0.4.1. It should be
correct now
hugh ***@***.***> 於 2021年4月7日週三 下午8:03寫道:
… For your case, how about adding a key, say, userInputHost in the response
object.
Therefore, we have around 3 keys talking about hosts but with subtle
difference:
- userInputHost: As title, host inputted from user
- host: Host parsed from the system command
- numeric_host: Host parsed, if possible, from the system command in a
numeric format
Hopefully, it can address your issue
I don't find this commit in the latest npm version v0.4.0 . Could you
please check it, thanks a lot.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5YBIY4GCN7RYHVTIV4WVTTHRCZDANCNFSM4VBJN6DQ>
.
|
Writing these tests:
both result in:
(the latter happen only when the network cable is unplugged)
I think it should have at least the
host
property setted to the actual host pinged. Not sure for other properties as ping implementation may vary depending on platforms (I'm on Ubuntu 18.04.3).The text was updated successfully, but these errors were encountered: