Skip to content

Commit a331303

Browse files
committed
Fix double logging on sophon update -> install fallback
1 parent f76517c commit a331303

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

CollapseLauncher/Classes/InstallManagement/BaseClass/InstallManagerBase.Sophon.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ public virtual async Task StartPackageInstallSophon(GameInstallStateEnum gameSta
147147
// Clear the VO language list
148148
_sophonVOLanguageList.Clear();
149149

150-
// Subscribe the logger event
151-
SophonLogger.LogHandler += UpdateSophonLogHandler;
150+
// Subscribe the logger event if fallback is not used
151+
if (!fallbackFromUpdate)
152+
{
153+
SophonLogger.LogHandler += UpdateSophonLogHandler;
154+
}
152155

153156
// Get the requested URL and version based on current state.
154157
if (_gameVersionManager.GamePreset
@@ -437,8 +440,11 @@ await Task.Run(() =>
437440
}
438441
finally
439442
{
440-
// Unsubscribe the logger event
441-
SophonLogger.LogHandler -= UpdateSophonLogHandler;
443+
// Unsubscribe the logger event if fallback is not used
444+
if (!fallbackFromUpdate)
445+
{
446+
SophonLogger.LogHandler -= UpdateSophonLogHandler;
447+
}
442448
httpClient.Dispose();
443449

444450
// Unsubscribe download limiter

0 commit comments

Comments
 (0)