Commit 0930167
committed
fix(js-sdk): stop waiting for stream close after command end event
On receiving the "end" event in iterateEvents(), call
handleDisconnect() to abort the transport controller, then let the
abort error propagate through the for-await loop. This allows
connectrpc's runStreamingCall to reach its finally block and clear
the deadline timer, avoiding resource leaks in Deno.
In handleEvents(), ignore iteration errors when a result has already
been captured since the error is the expected abort from disconnect.1 parent dc77742 commit 0930167
1 file changed
+4
-1
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 | | |
| |||
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
0 commit comments