소스 검색

close no longer needed ReceivePort

devmil 4 년 전
부모
커밋
da7e0f97c3
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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];