MCPcopy Index your code
hub / github.com/codeaashu/claude-code / releaseStreamResources

Function releaseStreamResources

src/services/api/claude.ts:1519–1526  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1517 // V8 heap (observed on the Node.js/npm path; see GH #32920), so we must
1518 // explicitly cancel and release it regardless of how the generator exits.
1519 function releaseStreamResources(): void {
1520 cleanupStream(stream)
1521 stream = undefined
1522 if (streamResponse) {
1523 streamResponse.body?.cancel().catch(() => {})
1524 streamResponse = undefined
1525 }
1526 }
1527
1528 // Consume pending cache edits ONCE before paramsFromContext is defined.
1529 // paramsFromContext is called multiple times (logging, retries), so consuming

Callers 2

resetStreamIdleTimerFunction · 0.85
queryModelFunction · 0.85

Calls 2

cleanupStreamFunction · 0.85
cancelMethod · 0.45

Tested by

no test coverage detected