Skip to content

Commit

Permalink
Fix an error during embedded compiler shutdown (#2092)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Sep 21, 2023
1 parent 873e91e commit de618fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/embedded/dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ final class Dispatcher {
_send(message);

var packet = _mailbox.take();
if (packet.isEmpty) {
// Compiler is shutting down, throw without calling `_handleError` as we
// don't want to report this as an actual error.
_requestError = true;
throw StateError('Compiler is shutting down.');
}

try {
var messageBuffer =
Expand Down

0 comments on commit de618fa

Please sign in to comment.