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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

"localhost" as default for host option can lead to long debugging sessions #7

Closed
TimDaub opened this issue Jan 8, 2021 · 0 comments

Comments

@TimDaub
Copy link

TimDaub commented Jan 8, 2021

馃憢馃徏 hey,

this is probably a bit subjective but the fact that the host option defaults to localhost actually cost me a couple of hours debugging right now.

I accidentally set await isPortReachable(22, { ipv4 }) and hence it would never resolve until I spotted the error that I had not set the host option appropriately.
Anyway, I think a better default would be to throw in case no host is set, as it means the function can't proceed.

@TimDaub TimDaub changed the title "localhost" as default can lead to long debugging sessions "localhost" as default for host option can lead to long debugging sessions Jan 8, 2021
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

1 participant