Skip to content

Commit 94c7c9f

Browse files
committed
Add unregister token for stream finalization registry
1 parent 739e21a commit 94c7c9f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/cuddly-bobcats-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/common': patch
3+
---
4+
5+
Fix warnings about leaked subscriptions even though `unsubscribe()` was called.

packages/common/src/client/ConnectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ class SyncStreamSubscriptionHandle implements SyncStreamSubscription {
368368

369369
constructor(readonly subscription: ActiveSubscription) {
370370
subscription.refcount++;
371-
_finalizer?.register(this, subscription);
371+
_finalizer?.register(this, subscription, this);
372372
}
373373

374374
get name() {

0 commit comments

Comments
 (0)