fix: some abort-related issues
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
eda6cf11ef
commit
2dd372600c
@ -6,6 +6,8 @@ InstanceCreationTask::InstanceCreationTask() = default;
|
||||
|
||||
void InstanceCreationTask::executeTask()
|
||||
{
|
||||
setAbortStatus(true);
|
||||
|
||||
if (updateInstance()) {
|
||||
emitSucceeded();
|
||||
return;
|
||||
|
@ -796,10 +796,12 @@ class InstanceStaging : public Task {
|
||||
// FIXME/TODO: add ability to abort during instance commit retries
|
||||
bool abort() override
|
||||
{
|
||||
if (m_child && m_child->canAbort())
|
||||
return m_child->abort();
|
||||
if (!canAbort())
|
||||
return false;
|
||||
|
||||
return false;
|
||||
m_child->abort();
|
||||
|
||||
return Task::abort();
|
||||
}
|
||||
bool canAbort() const override
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ bool FlameCreationTask::abort()
|
||||
if (!canAbort())
|
||||
return false;
|
||||
|
||||
m_abort = true;
|
||||
if (m_process_update_file_info_job)
|
||||
m_process_update_file_info_job->abort();
|
||||
if (m_files_job)
|
||||
|
@ -22,8 +22,9 @@ bool ModrinthCreationTask::abort()
|
||||
if (!canAbort())
|
||||
return false;
|
||||
|
||||
m_abort = true;
|
||||
if (m_files_job)
|
||||
return m_files_job->abort();
|
||||
m_files_job->abort();
|
||||
return Task::abort();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user