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

Keep WS connection alive/open (timeout, ping) #324

Open
penge opened this issue Aug 12, 2019 · 0 comments
Open

Keep WS connection alive/open (timeout, ping) #324

penge opened this issue Aug 12, 2019 · 0 comments

Comments

@penge
Copy link

penge commented Aug 12, 2019

live-server: 1.2.1
nodejs: 10.15.3

WebSocket connection can timeout and be closed due to inactivity, in my case (Cloud9) after 30 seconds.
More here: https://stackoverflow.com/questions/9056159/websocket-closing-connection-automatically and https://community.c9.io/t/websocket-support/14044

Due to this, live-reload will stop working if opened file is updated after 30 seconds since its last update (or since it was opened).

Solution: ping/pong to keep connection alive, and possibly make it configurable via option --ping with default let's say 15 seconds.

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