diff --git a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs index f7a7efbd..c1ab307c 100644 --- a/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs +++ b/src/Drivers/ZB.MOM.WW.OtOpcUa.Driver.Galaxy/GalaxyDriver.cs @@ -253,7 +253,11 @@ public sealed class GalaxyDriver _subscriber = new TracedGalaxySubscriber( new GatewayGalaxySubscriber(_ownedMxSession), _options.MxAccess.ClientName); _dataWriter = new TracedGalaxyDataWriter( - new GatewayGalaxyDataWriter(_ownedMxSession, _options.MxAccess.WriteUserId, _logger), + // Let the writer borrow live MXAccess item handles the subscription registry already + // holds, so the first write to an already-subscribed tag skips a redundant AddItem. + new GatewayGalaxyDataWriter( + _ownedMxSession, _options.MxAccess.WriteUserId, _logger, + _subscriptions.TryResolveItemHandle), _options.MxAccess.ClientName); _supervisor = new ReconnectSupervisor(