fix(memory): await reader.cancel() and use non-blocking Bun.gc

This commit is contained in:
Waleed Latif
2026-03-04 16:47:18 -08:00
parent 7efb8acac1
commit 52bb7e0294
2 changed files with 2 additions and 2 deletions

View File

@@ -672,7 +672,7 @@ export class BlockExecutor {
logger.error('Error reading executor stream for block', { blockId, error })
} finally {
try {
reader.cancel().catch(() => {})
await reader.cancel().catch(() => {})
} catch {}
}

View File

@@ -30,7 +30,7 @@ export function startMemoryTelemetry(intervalMs = 60_000) {
| { gc?: (force: boolean) => void }
| undefined
if (typeof bunGlobal?.gc === 'function') {
bunGlobal.gc(true)
bunGlobal.gc(false)
}
const mem = process.memoryUsage()