Esempio n. 1
0
        public override void shutdown()
        {
            base.shutdown();

            if (asyncCreateConnectionExecutor != null)
            {
                asyncCreateConnectionExecutor.shutdown();
            }

            if (null == connTasks || connTasks.IsEmpty)
            {
                return;
            }

            var removeList = new List <string>();

            foreach (var poolKey in connTasks.Keys)
            {
                removeTask(poolKey);
                removeList.Add(poolKey);
            }

            removeList.ForEach((poolKey) => connTasks.TryRemove(poolKey, out _));

            logger.LogWarning("All connection pool and connections have been removed!");
        }