Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Is the reconnect backoff working? #70

Closed
pward123 opened this issue Feb 9, 2017 · 2 comments
Closed

Is the reconnect backoff working? #70

pward123 opened this issue Feb 9, 2017 · 2 comments

Comments

@pward123
Copy link

pward123 commented Feb 9, 2017

I just upgraded to 0.5.0 to get reconnect working. It seems to really hammer the browser when I kill my graphql server. It gets so bad after a couple minutes that I can't even kill the tab in Chrome.

Is the backoff delay working currently?

@NeoPhi
Copy link
Contributor

NeoPhi commented Feb 9, 2017

It looks like a change in behavior is causing a reconnect storm to occur. @Urigo was there a use case that required adding https://github.com/apollographql/subscriptions-transport-ws/blame/master/src/client.ts#L265-L267 my understanding is that onclose is the only time we should attempt a reconnect. Otherwise a onerror fires followed by an onclose which we aren't guarding for.

@NeoPhi
Copy link
Contributor

NeoPhi commented Feb 9, 2017

Looks like not having the onerror leads to uncaught exceptions in the tests.

@helfer helfer closed this as completed in #71 Feb 9, 2017
helfer added a commit that referenced this issue Feb 9, 2017
only attempt reconnect on a closed connection, fix for #70
baconz pushed a commit to PhiloInc/subscriptions-transport-ws that referenced this issue Apr 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants