Fix plugin update race condition
This commit is contained in:
@@ -280,7 +280,7 @@ namespace Torch.Managers
|
|||||||
{
|
{
|
||||||
_log.Info("Checking for plugin updates...");
|
_log.Info("Checking for plugin updates...");
|
||||||
var count = 0;
|
var count = 0;
|
||||||
Task.WhenAll(plugins.Select(async item =>
|
Task.WaitAll(plugins.Select(async item =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -321,7 +321,7 @@ namespace Torch.Managers
|
|||||||
_log.Warn($"An error occurred updating the plugin {item.Manifest.Name}.");
|
_log.Warn($"An error occurred updating the plugin {item.Manifest.Name}.");
|
||||||
_log.Warn(e);
|
_log.Warn(e);
|
||||||
}
|
}
|
||||||
}));
|
}).ToArray());
|
||||||
|
|
||||||
_log.Info($"Updated {count} plugins.");
|
_log.Info($"Updated {count} plugins.");
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
Reference in New Issue
Block a user