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

Changed timeout_millis to delay, allowing reload to wait until the server is up #21

Merged
merged 6 commits into from
Aug 17, 2015
Merged

Conversation

alallier
Copy link
Owner

This feature changes the timeout_millis to delay. Now you can enter true in for a delay and reload will wait and check for the server to be up before it reloads.

…y, making reload wait until the server is up before refreshing
@alallier alallier changed the title Changed timeout_millis to delay, allowing reload wait until the server is up Changed timeout_millis to delay, allowing reload to wait until the server is up Jul 14, 2015
@jprichardson
Copy link
Collaborator

I really like the idea behind this. Why add use XMLHttpRequest to check server status? Why not use Websockets themselves? We could probably dump Sockjs, but I suppose that should be handled in a different issue.

Thanks for your help.

@alallier
Copy link
Owner Author

As far as i can tell the socket is closed when the server goes down, so we need to keep pinging the server to see if it’s up. Using a XHR seemed like the simplest way to do that, but i’m open to suggestions for other approaches.

@jprichardson
Copy link
Collaborator

Using a XHR seemed like the simplest way to do that, but i’m open to suggestions for other approaches.

What I meant was, why not just attempt to reopen a connection a new websocket to determine the status of the server?

@alallier
Copy link
Owner Author

With my latest commit, I rewrote reload-client.js to use sockets instead of xhr requests

jprichardson added a commit that referenced this pull request Aug 17, 2015
Changed timeout_millis to delay, allowing reload to wait until the server is up
@jprichardson jprichardson merged commit 0d93cd8 into alallier:master Aug 17, 2015
@alallier alallier deleted the waitServer branch August 17, 2015 17:05
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

Successfully merging this pull request may close these issues.

2 participants