Skip to content

Commit 10e85ca

Browse files
committed
Fix event loop crash
1 parent 0233d9e commit 10e85ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Cli/VerboseModeEnabler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ public static function start(): void
6767

6868
// Reset stty so it behaves normally again
6969
self::setSttyMode($previousSttyMode);
70+
})->catch(function (\Throwable $e) {
71+
// Silence CancelledException (expected when stop() is called), but rethrow other exceptions
72+
if (! $e instanceof \Amp\CancelledException) {
73+
throw $e;
74+
}
7075
});
7176
}
7277

0 commit comments

Comments
 (0)