From 82124ee4f83c0cae125c6962f53c3191f544d0a3 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 26 Jun 2026 18:29:40 -0400 Subject: [PATCH] fix(historian-gateway): guard canceled antecedent in provisioning continuation Addresses T15 review: treat a canceled EnsureTags task like a faulted one so the fire-and-forget continuation never reaches t.Result (which would re-throw and leave the discarded task unobserved). Claude-Session: https://claude.ai/code/session_012SDSQ3AcaXqPcBtDESBRii --- .../ZB.MOM.WW.OtOpcUa.OpcUaServer/AddressSpaceApplier.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/AddressSpaceApplier.cs b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/AddressSpaceApplier.cs index c577ad77..8439636b 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/AddressSpaceApplier.cs +++ b/src/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer/AddressSpaceApplier.cs @@ -246,10 +246,12 @@ public sealed class AddressSpaceApplier _ = dispatch.ContinueWith( t => { - if (t.IsFaulted) + if (!t.IsCompletedSuccessfully) { + // Faulted OR canceled — never reach t.Result (which would re-throw and + // leave this discarded continuation unobserved). _logger.LogWarning(t.Exception?.GetBaseException(), - "AddressSpaceApplier: historian provisioning of {Count} tag(s) faulted; deploy unaffected", provisionCount); + "AddressSpaceApplier: historian provisioning of {Count} tag(s) did not complete; deploy unaffected", provisionCount); return; }