Fix process exit: use process.exit() directly instead of logStream.end callback
logStream.end() callback wasn't firing reliably, leaving processes hanging. process.exit() is synchronous and forces exit regardless of open handles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -249,9 +249,9 @@ async function main() {
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
logStream.end(() => process.exit(0));
|
||||
process.exit(0);
|
||||
}).catch(e => {
|
||||
console.error('Fatal:', e.message);
|
||||
if (e.stack) console.error(e.stack);
|
||||
logStream.end(() => process.exit(1));
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user