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

Just spins on Ping #13

Closed
pixmonkey opened this issue Sep 2, 2015 · 6 comments
Closed

Just spins on Ping #13

pixmonkey opened this issue Sep 2, 2015 · 6 comments

Comments

@pixmonkey
Copy link

Any reason the test would just spin and stick on the Ping?

Not really sure if it is an issue but it is what I am seeing when I run the test in OSX Terminal.

@sindresorhus
Copy link
Owner

Do you happen to be behind a proxy? ddsol/speedtest.net#8

@pixmonkey
Copy link
Author

No. The only thing close to that would be I am using DHCP on my router.

@thomasqbrady
Copy link

+1

@matthewhadley
Copy link

I'm hanging on ping too. Digging into the guts of the speed-test module it was getting stuck here:
https://github.com/ddsol/speedtest.net/blob/master/index.js#L260
In my test:

  • servers.length was 3760
  • count was 5 (this value comes from default options)

The pingServers function has a loop using the smallest of the two above values. The n variable used in the loop is zero based and was never reaching 5 so that done could equal todo. changing the check to <=todo made things work:

for(var n=0;n<=todo;n++)(function(server){

edit: kept n zero based, change check to <=todo

@pixmonkey
Copy link
Author

Yep, that fixed it. Nicely done.

@sindresorhus
Copy link
Owner

Fixed by ddsol/speedtest.net#12.

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