Skip to content

Commit ba64bbb

Browse files
authored
Let the IsolateChannel close the ReceivePort (#2196)
The `IsolateChannel` should close the receive port when we call `outerChannel.sink.close` which is also added to the `cleanupCallbacks`. This was originally added in #1280 to try to fix cases where the test runner could hang after running some tests specifically on the test runner CI when running the test as a subprocess. It looks like when it was introduced there was no call to `outerChannel.sink.close()`. A cleanup callback to close the sink was added in #1941 which made this unnecessary.
1 parent 7724aab commit ba64bbb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkgs/test_core/lib/src/runner/vm/platform.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ class VMPlatform extends PlatformPlugin {
8080
rethrow;
8181
}
8282
outerChannel = MultiChannel(IsolateChannel.connectReceive(receivePort));
83-
cleanupCallbacks
84-
..add(receivePort.close)
85-
..add(isolate.kill);
83+
cleanupCallbacks.add(isolate.kill);
8684
}
8785
cleanupCallbacks.add(outerChannel.sink.close);
8886

0 commit comments

Comments
 (0)