mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Fix(NetJob): do not call emitAborted() when not running
Signed-off-by: 0x189D7997 <199489335+0x189D7997@users.noreply.github.com>
This commit is contained in:
parent
15b39af92e
commit
ffded2ccac
1 changed files with 7 additions and 2 deletions
|
|
@ -100,13 +100,18 @@ auto NetJob::canAbort() const -> bool
|
|||
|
||||
auto NetJob::abort() -> bool
|
||||
{
|
||||
bool fullyAborted = true;
|
||||
|
||||
// fail all downloads on the queue
|
||||
for (auto task : m_queue)
|
||||
m_failed.insert(task.get(), task);
|
||||
m_queue.clear();
|
||||
|
||||
if (m_doing.isEmpty()) {
|
||||
// no downloads to abort, NetJob is not running
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fullyAborted = true;
|
||||
|
||||
// abort active downloads
|
||||
auto toKill = m_doing.values();
|
||||
for (auto part : toKill) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue