1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 11:23:40 +00:00

Fixed crash on exit while downloading from webseed (#4451)

This commit is contained in:
Cœur 2022-12-24 01:34:08 +08:00 committed by GitHub
parent 14a3d01e45
commit 3cee8bae36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -452,9 +452,6 @@ void onPartialDataFetched(tr_web::FetchResponse const& web_response)
bool const success = status == 206; bool const success = status == 206;
auto* const task = static_cast<tr_webseed_task*>(vtask); auto* const task = static_cast<tr_webseed_task*>(vtask);
auto* const webseed = task->webseed;
webseed->connection_limiter.taskFinished(success);
if (task->dead) if (task->dead)
{ {
@ -462,6 +459,9 @@ void onPartialDataFetched(tr_web::FetchResponse const& web_response)
return; return;
} }
auto* const webseed = task->webseed;
webseed->connection_limiter.taskFinished(success);
if (auto const* const tor = webseed->getTorrent(); tor == nullptr) if (auto const* const tor = webseed->getTorrent(); tor == nullptr)
{ {
return; return;