Skip to content

Commit 8308d03

Browse files
authored
Don't manually call free (#599)
1 parent b7e7b73 commit 8308d03

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

  • packages/automerge-repo/src/subduction

packages/automerge-repo/src/subduction/source.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -672,9 +672,9 @@ export class SubductionSource implements DocumentSource {
672672
// 5. Wait for SubductionStorageBridge writes to land on disk
673673
await this.#storage.awaitSettled()
674674

675-
// 6. Disconnect all Wasm-side transports gracefully, then free.
675+
// 6. Disconnect all Wasm-side transports gracefully.
676676
// If hydration failed, this.#subduction is a rejected promise —
677-
// treat that as a no-op (nothing to disconnect or free).
677+
// treat that as a no-op (nothing to disconnect).
678678
let subduction: Subduction | null = null
679679
try {
680680
subduction = await this.#subduction
@@ -686,12 +686,6 @@ export class SubductionSource implements DocumentSource {
686686
await subduction.disconnectAll()
687687
} catch (e) {
688688
this.#log("error disconnecting subduction transports: %O", e)
689-
} finally {
690-
try {
691-
subduction.free()
692-
} catch (e) {
693-
this.#log("error freeing subduction resources: %O", e)
694-
}
695689
}
696690
}
697691

0 commit comments

Comments
 (0)