ServiceStack.Redis.RedisPubSubServer.NotifyAllSubscribers C# (CSharp) Method

NotifyAllSubscribers() private method

private NotifyAllSubscribers ( string commandType = null ) : void
commandType string
return void
        private void NotifyAllSubscribers(string commandType=null)
        {
            var msg = ControlCommand.Control;
            if (commandType != null)
                msg += ":" + commandType;

            try
            {
                using (var redis = ClientsManager.GetClient())
                {
                    foreach (var channel in Channels)
                    {
                        redis.PublishMessage(channel, msg);
                    }
                }
            }
            catch (Exception ex)
            {
                if (this.OnError != null) this.OnError(ex);
                Log.Warn("Could not send '{0}' message to bg thread: {1}".Fmt(msg, ex.Message));
            }
        }