mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
On Client.stop, terminate the isolate
Shutdown on MacOS doesn't work properly. The process appears to shutdown, but will continue to run in the background. It can run infinitely if it's stuck in a JS loop. To help it along, Client.stop now force-terminates the isolate. I also don't think shutdown is working as intended on Linux, but the problem seems less serious there. On Linux, it appears to properly kill the process (which is the important thing), but I don't think it necessarily does a clean shutdown.
This commit is contained in:
@@ -296,6 +296,10 @@ pub const Client = struct {
|
||||
}
|
||||
|
||||
fn stop(self: *Client) void {
|
||||
switch (self.mode) {
|
||||
.http => {},
|
||||
.cdp => |*cdp| cdp.browser.env.terminate(),
|
||||
}
|
||||
self.ws.shutdown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user