1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: don't process http announce error if already succeeded (#7086)

This commit is contained in:
Yat Ho 2024-09-03 05:24:35 +08:00 committed by GitHub
parent 5260331732
commit 461e178c8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,16 +154,12 @@ void onAnnounceDone(tr_web::FetchResponse const& web_response)
} }
else if (got_all_responses) else if (got_all_responses)
{ {
auto const* response_used = &response;
// All requests have been answered, but none were successful. // All requests have been answered, but none were successful.
// Choose the one that went further to report. // Choose the one that went further to report.
if (data->previous_response && !response.did_connect && !response.did_timeout) if (data->previous_response)
{ {
response_used = &*data->previous_response; data->on_response(response.did_connect || response.did_timeout ? response : *data->previous_response);
} }
data->on_response(*response_used);
} }
else else
{ {