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 not closing after done #1806

Closed
nedsalk opened this issue Feb 26, 2024 · 1 comment · Fixed by #1793
Closed

Subscriptions not closing after done #1806

nedsalk opened this issue Feb 26, 2024 · 1 comment · Fixed by #1793
Assignees
Labels
bug Issue is a bug

Comments

@nedsalk
Copy link
Contributor

nedsalk commented Feb 26, 2024

Subscriptions that are not manually cancelled (e.g. with a break in a for-await-of loop) do not end when the underlying stream closes.
This is because the current implementation with the FuelSubscriptionStream stream transformer ignores the value which signifies stream completion {value: undefined, done: true}, as explained on the MDN:

If the stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }.

@nedsalk nedsalk added the bug Issue is a bug label Feb 26, 2024
@nedsalk nedsalk self-assigned this Feb 26, 2024
@nedsalk nedsalk linked a pull request Feb 26, 2024 that will close this issue
@arboleya
Copy link
Member

Related:
https://forum.fuel.network/t/failed-to-deploy-contract-using-typescript-sdk/4440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants