fix(pcap): retain independent probe cleanup owners

This commit is contained in:
morluto committed 2026-10-24 08:22:14 +08:00
1 parent 4643844ea5
commit c2455152c9
4 files changed
+22 -9

No files matched your search

+10 -8
View File
@@ -181,14 +181,16 @@ export const runPcapCommand = async (options: {
},
}
: {}),
...(cause instanceof OwnedCommandFailure && cause.cleanupFailure !== null
? {
cleanup: {
reason: cause.cleanupFailure,
resources: cause.resources,
},
}
: {}),
...(cleanup !== undefined
? { cleanup }
: cause instanceof OwnedCommandFailure && cause.cleanupFailure !== null
? {
cleanup: {
reason: cause.cleanupFailure,
resources: cause.resources,
},
}
: {}),
};
if (cause instanceof OwnedCommandFailure && cause.reason === "cancelled")
throw new AnalysisCancelledError(operation, {