From 25bcfea835aa1d2c24636d3343f88c60278ae1eb Mon Sep 17 00:00:00 2001 From: Peter Butzhammer Date: Fri, 9 Feb 2024 09:58:16 +0100 Subject: [PATCH] Add connectionState.Disposed --- Sharp7.Rx/Enums/ConnectionState.cs | 3 ++- Sharp7.Rx/Sharp7Connector.cs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sharp7.Rx/Enums/ConnectionState.cs b/Sharp7.Rx/Enums/ConnectionState.cs index 5cbedc5..ada7634 100644 --- a/Sharp7.Rx/Enums/ConnectionState.cs +++ b/Sharp7.Rx/Enums/ConnectionState.cs @@ -5,5 +5,6 @@ public enum ConnectionState Initial, Connected, DisconnectedByUser, - ConnectionLost + ConnectionLost, + Disposed } diff --git a/Sharp7.Rx/Sharp7Connector.cs b/Sharp7.Rx/Sharp7Connector.cs index 951ff0c..3fca9a7 100644 --- a/Sharp7.Rx/Sharp7Connector.cs +++ b/Sharp7.Rx/Sharp7Connector.cs @@ -206,6 +206,7 @@ internal class Sharp7Connector : IS7Connector sharp7 = null; } + connectionStateSubject?.OnNext(Enums.ConnectionState.Disposed); connectionStateSubject?.OnCompleted(); connectionStateSubject?.Dispose(); }