Modules UI - Fixed activation view not subscribing sometimes

Core - Don't attempt to catch a timeout during module override, only pain down that route
This commit is contained in:
SpoinkyNL committed 2020-08-26 22:16:30 +02:00
1 parent 1046d51686
commit bec8ece5dd
2 files changed
+6 -10

No files matched your search

+3 -5
View File
@@ -44,12 +44,11 @@ namespace Artemis.Core.Services
public async Task SetActiveModuleOverride(Module overrideModule)
{
await ActiveModuleSemaphore.WaitAsync();
if (ActiveModuleOverride == overrideModule)
return;
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
throw new ArtemisCoreException("Timed out while acquiring active module lock");
try
{
ActiveModuleOverride = overrideModule;
@@ -92,8 +91,7 @@ namespace Artemis.Core.Services
if (ActiveModuleOverride != null)
return;
if (!await ActiveModuleSemaphore.WaitAsync(TimeSpan.FromSeconds(10)))
throw new ArtemisCoreException("Timed out while acquiring active module lock");
await ActiveModuleSemaphore.WaitAsync();
try
{