/// <summary> /// Invoked when the node is disposing. /// Closes all network streams and unregister this node from the IPubSubRouter instance. /// </summary> protected override void OnDispose() { _pubSubRouter?.Unregister(this); _clientSocket?.Close(); _clientSocket = null; _pubSubRouter = null; }
/// <summary> /// Invoked when the node is disposing. /// </summary> protected override void OnDispose() { _isConnected = false; _pubSubRouter.Unregister(this); _pubSubRouter = null; }