Przeglądaj źródła

close no longer needed ReceivePort

devmil 4 lat temu
rodzic
commit
da7e0f97c3
1 zmienionych plików z 1 dodań i 0 usunięć
  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];