Skip to content

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

@warrenisarobot

Description

@warrenisarobot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions