mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
Fixed crash on exit while downloading from webseed (#4451)
This commit is contained in:
parent
14a3d01e45
commit
3cee8bae36
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue