Kill resident runner on browser disconnect. (#39066)
This commit is contained in:
parent
a1c185f37a
commit
0f8b8c91a3
@ -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();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user