mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix(PackProfile): overwrite update task when it has different network mode
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
04786023b0
commit
cd006d642b
4 changed files with 16 additions and 2 deletions
|
|
@ -326,7 +326,15 @@ PackProfile::Result PackProfile::reload(Net::Mode netmode)
|
|||
{
|
||||
// Do not reload when the update/resolve task is running. It is in control.
|
||||
if (d->m_updateTask) {
|
||||
return Result::Success();
|
||||
if (d->m_updateTask->netMode() == netmode) {
|
||||
return Result::Success();
|
||||
}
|
||||
|
||||
// https://github.com/PrismLauncher/PrismLauncher/issues/5209
|
||||
// FIXME: HACK HACK HACK
|
||||
disconnect(d->m_updateTask.get(), &ComponentUpdateTask::aborted, nullptr, nullptr);
|
||||
d->m_updateTask->abort();
|
||||
d->m_updateTask.reset();
|
||||
}
|
||||
|
||||
// flush any scheduled saves to not lose state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue