Example #1
0
        /// <summary>
        /// Called when local client node has been disconnected from the cluster.
        /// </summary>
        internal void OnClientDisconnected()
        {
            // Clear cached node data.
            // Do not clear _nodes - it is in sync with PlatformContextImpl.sentNodes.
            _locNode = null;
            _prj.ClearCachedNodeData();

            // Raise events.
            _clientReconnectTaskCompletionSource = new TaskCompletionSource <bool>();

            var handler = ClientDisconnected;

            if (handler != null)
            {
                handler.Invoke(this, EventArgs.Empty);
            }
        }