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

Timeout doesn't stop page load #6

Open
viewty opened this issue Jun 22, 2016 · 2 comments
Open

Timeout doesn't stop page load #6

viewty opened this issue Jun 22, 2016 · 2 comments

Comments

@viewty
Copy link

viewty commented Jun 22, 2016

Hiya,

Thanks for making this - I'm using it to ping a load of devices on my home network. One thing I've noticed though is it throws the timeout error correctly (after 5s as per the default) but that doesn't stop the script running so the page continues to try to load.

Is there a little adjustment that could be made to fix this?

@jdfreder
Copy link
Owner

I think so, we should be able to delete the element used to ping the remote machine.

@jdfreder
Copy link
Owner

After digging around a bit, I don't think it's that simple. On the brightside, here's a workaround you should be able to use:

In the .catch of the promise, if it's occurring because of a timeout, call window.stop(). I think that'll do the trick, not sure though.

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

2 participants