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

Question : How do you deal with server stop/start #197

Open
dngconsulting opened this issue Jan 19, 2022 · 1 comment
Open

Question : How do you deal with server stop/start #197

dngconsulting opened this issue Jan 19, 2022 · 1 comment

Comments

@dngconsulting
Copy link

Hi,

First, thanks for this wonderful polyfill. Works the right way.
I have a question regarding the way it deals with servers start/stop. Sometimes, we need to stop and start our server. Relying to heartBeat is too overkill for us as it will reconnect continuously (we don't send events all the times) to the server. When the server is stopped, the XHR Socket status looks active whereas the server is down. Aren't there any way to detect that the XHR socket is broken and raise a specific error ?

Thanks

Sami

@Yaffle
Copy link
Owner

Yaffle commented Jan 23, 2022

Hi, thanks!
hm... TCP connection close packet signals the other end that the connection is closing, not sure what is going on with your case.
May be you are killing the server or break the connection somehow, without "heartbeat" those cases will be detect by TCP keeaplive probes (if the web browser uses them, and some browsers do it, it may take 1minute or more)
But in normal cases it should work.
Why doesn't it work for you?

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