diff --git a/src/ZB.MOM.WW.MxGateway.Worker/Ipc/WorkerPipeSession.cs b/src/ZB.MOM.WW.MxGateway.Worker/Ipc/WorkerPipeSession.cs index a92fa0b..d61287c 100644 --- a/src/ZB.MOM.WW.MxGateway.Worker/Ipc/WorkerPipeSession.cs +++ b/src/ZB.MOM.WW.MxGateway.Worker/Ipc/WorkerPipeSession.cs @@ -1232,7 +1232,14 @@ public sealed class WorkerPipeSession _activeCommandTasks.Add(commandTask); } - _ = ObserveCommandTaskAsync(commandTask); + // WRK-33: every other discarded task in this file is wrapped with ObserveFaultWhenever + // (NEXT-04 discipline) so a fault reaching the finalizer unobserved is impossible. This + // wrapper task was the one exception — ObserveCommandTaskAsync only swallows + // OperationCanceledException, so any other exception escaping ProcessCommandAsync's own + // catch path (e.g. a future edit, or a failure past TryWriteFaultAsync's narrow filter) + // would fault the discarded task with no observer. Close the gap the same way the rest of + // the file does. + ObserveFaultWhenever(ObserveCommandTaskAsync(commandTask)); } private async Task ObserveCommandTaskAsync(Task commandTask)