Unverified Commit 0f8b8c91 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Kill resident runner on browser disconnect. (#39066)

parent a1c185f3
......@@ -160,6 +160,7 @@ class ResidentWebRunner extends ResidentRunner {
);
if (supportsServiceProtocol) {
_debugConnection = await _webFs.runAndDebug();
unawaited(_debugConnection.onDone.whenComplete(exit));
}
} catch (err, stackTrace) {
printError(err.toString());
......
......@@ -65,6 +65,9 @@ void main() {
return Future<bool>.value(false);
});
when(mockDebugConnection.vmService).thenReturn(mockVmService);
when(mockDebugConnection.onDone).thenAnswer((Invocation invocation) {
return Completer<void>().future;
});
when(mockVmService.onStdoutEvent).thenAnswer((Invocation _) {
return const Stream<Event>.empty();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment