cdp: accept multiple attachToTarget calls

This commit is contained in:
Pierre Tachoire
2025-11-18 18:23:53 +01:00
parent c4bf37fb5b
commit 4c37a8e766

View File

@@ -199,12 +199,10 @@ fn attachToTarget(cmd: anytype) !void {
return error.UnknownTargetId;
}
if (bc.session_id != null) {
return error.SessionAlreadyLoaded;
if (bc.session_id == null) {
try doAttachtoTarget(cmd, target_id);
}
try doAttachtoTarget(cmd, target_id);
return cmd.sendResult(
.{ .sessionId = bc.session_id },
.{ .include_session_id = false },