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

Subscriptions request streams do not close when the server closes the subscription. #630

Open
warrenisarobot opened this issue Feb 13, 2025 · 0 comments

Comments

@warrenisarobot
Copy link
Contributor

When performing a Subscription operation we do a .listen() on the resulting stream to process the events as they come in. Sometimes the subscription is closed from the server side, but if we provide an onDone() handler it is never executed.

An example from using the ferry Client:

  final wsLink = websocket.TransportWebSocketLink(opts);
  final wsClient = Client(link: wsLink, defaultFetchPolicies: policies);
  final req = GexampleReq((b) {});

//using the link directly the onDone will fire
link.request(req.execRequest).listen(print, onDone: () => print("link is done()"));

//using the Client the onDone will not fire
wsClient.request(req).listen(print, onDone: () => print("wsClient is done()"));

I have a PR to address this here:

#629

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