Downloader::close() pauses all downloads

Otherwise, creating a Downloader object next time may take very long (or
that operation may get stuck) if an active download is being saved to slow
media.
This commit is contained in:
Veloman Yunkan 2024-06-28 12:41:10 +04:00
parent af96b19bd1
commit c46cd403ae
1 changed files with 3 additions and 0 deletions

View File

@ -117,6 +117,9 @@ Aria2::Aria2():
void Aria2::close() void Aria2::close()
{ {
MethodCall methodCall("aria2.pauseAll", m_secret);
doRequest(methodCall);
saveSession(); saveSession();
shutdown(); shutdown();
} }