mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
fix: detach sig_bridge before agent deinit
Reorder defer statements in agentThread to ensure the signal bridge is detached before the agent instance is deinitialized.
This commit is contained in:
@@ -223,8 +223,8 @@ fn agentThread(allocator: std.mem.Allocator, app: *App, opts: Config.Agent, fail
|
||||
return;
|
||||
};
|
||||
sig_bridge.attach(agent_instance);
|
||||
defer sig_bridge.detach();
|
||||
defer agent_instance.deinit();
|
||||
defer sig_bridge.detach();
|
||||
|
||||
if (!agent_instance.run()) {
|
||||
failed.* = true;
|
||||
|
||||
Reference in New Issue
Block a user