Prechádzať zdrojové kódy

close no longer needed ReceivePort

devmil 4 rokov pred
rodič
commit
da7e0f97c3
1 zmenil súbory, kde vykonal 1 pridanie a 0 odobranie
  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];