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,11 +199,9 @@ 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 },