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