mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-15 15:58:57 +00:00
cdp: accept multiple attachToTarget calls
This commit is contained in:
@@ -199,12 +199,10 @@ fn attachToTarget(cmd: anytype) !void {
|
|||||||
return error.UnknownTargetId;
|
return error.UnknownTargetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bc.session_id != null) {
|
if (bc.session_id == null) {
|
||||||
return error.SessionAlreadyLoaded;
|
try doAttachtoTarget(cmd, target_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
try doAttachtoTarget(cmd, target_id);
|
|
||||||
|
|
||||||
return cmd.sendResult(
|
return cmd.sendResult(
|
||||||
.{ .sessionId = bc.session_id },
|
.{ .sessionId = bc.session_id },
|
||||||
.{ .include_session_id = false },
|
.{ .include_session_id = false },
|
||||||
|
|||||||
Reference in New Issue
Block a user