This allows exiting from async stream iterators when subscription is removed from Client's registry (i.e. when Client.removeSubscription is called):
final subscription = client.newSubscription(...);
final onPublicationEvent = () async {
await for (var i in subscription.publication) {
print('publication: $i');
}
print("subscription removed");
};
onPublicationEvent();
client.removeSubscription(subscription)
This allows exiting from async stream iterators when subscription is removed from Client's registry (i.e. when
Client.removeSubscription
is called):Adresses #65