Skip to content

Fix #69: Handle unhandled promise rejections in AdaptiveMemoryManager#124

Merged
thedhanawada merged 1 commit intomasterfrom
fix/issue-69-unhandled-promise
Mar 20, 2026
Merged

Fix #69: Handle unhandled promise rejections in AdaptiveMemoryManager#124
thedhanawada merged 1 commit intomasterfrom
fix/issue-69-unhandled-promise

Conversation

@thedhanawada
Copy link
Copy Markdown
Collaborator

Fix

Added .catch() handlers to checkMemoryPressure() calls in startMonitoring() (AdaptiveMemoryManager.js:71-77).

checkMemoryPressure() is async but was called from setInterval without await or catch. If it threw, the promise rejection was unhandled — potentially crashing Node.js or silently swallowing errors in browsers.

Files Changed

  • core/performance/AdaptiveMemoryManager.js — 6 lines added, 2 removed

Fixes #69

checkMemoryPressure() is async but was called from setInterval without
awaiting or catching the returned promise. If it threw, the rejection
was unhandled — potentially crashing Node.js or silently swallowing
errors in browsers.

Added .catch() to both the interval callback and the initial check.

Fixes #69
@thedhanawada thedhanawada merged commit f5c788e into master Mar 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AdaptiveMemoryManager: unhandled promise rejections from async setInterval callback

1 participant