File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ https://nacos-sdk-csharp.readthedocs.io/en/latest/
42
42
// after v1.3.3, we can use UseNacosConfig to simplify
43
43
public static IHostBuilder CreateHostBuilder (string [] args ) =>
44
44
Host .CreateDefaultBuilder (args )
45
- .UseNacosConfig (section : " NacosConfig" , parser : null logAction : null )
45
+ .UseNacosConfig (section : " NacosConfig" , parser : null , logAction : null )
46
46
// .UseNacosConfig(section: "NacosConfig", parser: Nacos.YamlParser.YamlConfigurationStringParser.Instance logAction: null)
47
47
// .UseNacosConfig(section: "NacosConfig", parser: Nacos.IniParser.IniConfigurationStringParser.Instance logAction: null)
48
48
.ConfigureWebHostDefaults (webBuilder =>
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ https://nacos-sdk-csharp.readthedocs.io/en/latest/
44
44
// v1.3.3 版本之后, 可以用 UseNacosConfig 来简化
45
45
public static IHostBuilder CreateHostBuilder (string [] args ) =>
46
46
Host .CreateDefaultBuilder (args )
47
- .UseNacosConfig (section : " NacosConfig" , parser : null logAction : null )
47
+ .UseNacosConfig (section : " NacosConfig" , parser : null , logAction : null )
48
48
// .UseNacosConfig(section: "NacosConfig", parser: Nacos.YamlParser.YamlConfigurationStringParser.Instance logAction: null)
49
49
// .UseNacosConfig(section: "NacosConfig", parser: Nacos.IniParser.IniConfigurationStringParser.Instance logAction: null)
50
50
.ConfigureWebHostDefaults (webBuilder =>
Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<PropertyGroup >
3
- <NugetVersion >1.3.5 </NugetVersion >
3
+ <NugetVersion >1.3.6 </NugetVersion >
4
4
</PropertyGroup >
5
5
</Project >
Original file line number Diff line number Diff line change @@ -334,6 +334,7 @@ protected async override Task ExecuteConfigListen()
334
334
{
335
335
var listenCachesMap = new Dictionary < string , List < CacheData > > ( ) ;
336
336
var removeListenCachesMap = new Dictionary < string , List < CacheData > > ( ) ;
337
+ var hasChangedKeys = false ;
337
338
338
339
// TODO: should update logic here.....
339
340
foreach ( var item in _cacheMap . Values )
@@ -392,6 +393,7 @@ protected async override Task ExecuteConfigListen()
392
393
393
394
if ( configChangeBatchListenResponse . ChangedConfigs != null && configChangeBatchListenResponse . ChangedConfigs . Any ( ) )
394
395
{
396
+ hasChangedKeys = true ;
395
397
foreach ( var item in configChangeBatchListenResponse . ChangedConfigs )
396
398
{
397
399
var changeKey = GroupKey . GetKeyTenant ( item . DataId , item . Group , item . Tenant ) ;
@@ -450,6 +452,9 @@ protected async override Task ExecuteConfigListen()
450
452
}
451
453
}
452
454
}
455
+
456
+ if ( hasChangedKeys )
457
+ await NotifyListenConfig ( ) . ConfigureAwait ( false ) ;
453
458
}
454
459
455
460
private async Task RefreshContentAndCheck ( string groupKey , bool notify )
You can’t perform that action at this time.
0 commit comments