Commit 63e5ab4
committed
fix(js-sdk): return from iterateEvents on end instead of break
The async generator continued waiting for the transport-level gRPC
stream to close after receiving the "end" event. Using return instead
of break exits the generator immediately once the command result is
captured. Calling handleDisconnect() before returning aborts the
transport controller, which cleans up the fetch response body and
deadline timer to avoid resource leaks.
Disable sanitizeOps in the Deno runtime test since connectrpc's
internal deadline timer cleanup propagates asynchronously after the
controller abort, which Deno's strict leak detection flags as a
leaked op.1 parent dc77742 commit 63e5ab4
File tree
2 files changed
+18
-13
lines changed- packages/js-sdk
- src/sandbox/commands
- tests/runtimes/deno
2 files changed
+18
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | | - | |
| 21 | + | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
21 | 24 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
0 commit comments