diff --git a/src/CanKit.Pro.IsoTp/IsoTpChannel.cs b/src/CanKit.Pro.IsoTp/IsoTpChannel.cs index 6c160366..32d5ae4e 100644 --- a/src/CanKit.Pro.IsoTp/IsoTpChannel.cs +++ b/src/CanKit.Pro.IsoTp/IsoTpChannel.cs @@ -262,8 +262,10 @@ internal IsoTpChannel(ICanBusService service, IsoTpEndpoint endpoint, } catch { - _actor.BackgroundExceptionOccurred -= OnActorBackgroundException; + // Unsubscribe only after an owned actor's Dispose, as the J1939 constructors do + // (#442): that is where the actor reports a callback that outlived its shutdown bound. if (_ownsActor) _actor.Dispose(); + _actor.BackgroundExceptionOccurred -= OnActorBackgroundException; throw; }