diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs index d45304406..b36a1fb9d 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy.RemoteService/LINGYUN/Abp/MultiTenancy/RemoteService/EventBus/Distributed/TenantSynchronizer.cs @@ -85,13 +85,10 @@ public class TenantSynchronizer : { using (_currentTenant.Change(null)) { - using (_currentTenant.Change(null)) + await _cache.RemoveAsync(TenantConfigurationCacheItem.CalculateCacheKey(tenantId.ToString())); + if (!tenantName.IsNullOrWhiteSpace()) { - await _cache.RemoveAsync(TenantConfigurationCacheItem.CalculateCacheKey(tenantId.ToString())); - if (!tenantName.IsNullOrWhiteSpace()) - { - await _cache.RemoveAsync(TenantConfigurationCacheItem.CalculateCacheKey(tenantName)); - } + await _cache.RemoveAsync(TenantConfigurationCacheItem.CalculateCacheKey(tenantName)); } } }