|
|
@@ -117,7 +117,20 @@ namespace OpenCards.Server.Arena
|
|
|
{
|
|
|
ServerUtils.StopServiceFunc?.Invoke(valorAddr.FullPath);
|
|
|
}
|
|
|
- await this.Provider.CreateAsync(valorAddr, config);
|
|
|
+ // 这里不能直接CreateAsync,会与外层调用锁冲突产生死锁
|
|
|
+ var capturedConfig = new Dictionary<string, string>(config);
|
|
|
+ _ = Task.Run(async () =>
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ await this.Provider.CreateAsync(valorAddr, capturedConfig);
|
|
|
+ log.Warn($"ArenaValorService [{valorAddr}] created successfully (deferred)");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ log.Error($"Failed to create ArenaValorService [{valorAddr}]: {ex}", ex);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (this.dataMapping.ArenaValorCurrentID >= 1)
|