Explorar o código

close no longer needed ReceivePort

devmil %!s(int64=4) %!d(string=hai) anos
pai
achega
da7e0f97c3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      lib/terminal/terminal_isolate.dart

+ 1 - 0
lib/terminal/terminal_isolate.dart

@@ -342,6 +342,7 @@ class TerminalIsolate with Observable implements TerminalUiInteraction {
     var firstReceivePort = ReceivePort();
     _isolate = await Isolate.spawn(terminalMain, firstReceivePort.sendPort);
     _sendPort = await firstReceivePort.first;
+    firstReceivePort.close();
     _sendPort!.send([_IsolateCommand.sendPort, _receivePort.sendPort]);
     _receivePort.listen((message) {
       _IsolateEvent action = message[0];