Skip to content

Commit ba6a01a

Browse files
committed
address bugbot comments
1 parent dd57954 commit ba6a01a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/sim/lib/execution/isolated-vm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function truncateString(value: string, maxChars: number): { value: string; trunc
143143
}
144144

145145
function normalizeFetchOptions(options?: IsolatedFetchOptions): SecureFetchOptions {
146-
if (!options) return {}
146+
if (!options) return { maxResponseBytes: MAX_FETCH_RESPONSE_BYTES }
147147

148148
const normalized: SecureFetchOptions = {
149149
maxResponseBytes: MAX_FETCH_RESPONSE_BYTES,
@@ -851,7 +851,8 @@ function dispatchToWorker(
851851
error: { message: 'Failed to send execution request to worker', name: 'WorkerError' },
852852
})
853853
resetWorkerIdleTimeout(workerInfo.id)
854-
drainQueue()
854+
// Defer to break synchronous recursion: drainQueue → dispatchToWorker → catch → drainQueue
855+
queueMicrotask(() => drainQueue())
855856
}
856857
}
857858

0 commit comments

Comments
 (0)