fix: address Copilot review round 6 on #2318
RemoteClientTransport tracks open streams only when onFetchStreamUpdate is registered — the bookkeeping serves that callback alone, and without it the set would grow by one entry per reconnect. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01APKSYHGxXBUpnR7ErFiLJn Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
a38f1322c1
commit
091db9b6dd
1 changed files with 4 additions and 1 deletions
|
|
@ -556,8 +556,11 @@ export class RemoteClientTransport implements Transport {
|
|||
const entry = parsed.data;
|
||||
// Stream bookkeeping runs whether or not the consumer logs
|
||||
// requests: `onFetchStreamUpdate` is documented to work on its
|
||||
// own, and `close()` needs to know which streams are open.
|
||||
// own, and `close()` needs to know which streams are open. It
|
||||
// exists only to serve that callback, though — without one the
|
||||
// set would only ever grow, one entry per reconnect.
|
||||
if (
|
||||
this.options.onFetchStreamUpdate &&
|
||||
isLongLivedStreamResponse(
|
||||
entry.method,
|
||||
findHeader(entry.responseHeaders, "content-type"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue