mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibHTTP: Disable finish repeat timer before deferring job completion
It was possible to reach this via the timer itself (when the client is only slightly busy), and then to have the timer fire before the deferred invocation fires. This commit removes the race by disabling the timer when the final deferred-accept state is reached.
This commit is contained in:
parent
ec766e8669
commit
b9d2d1b478
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/alimpfard
Commit: b9d2d1b478
Pull-request: https://github.com/SerenityOS/serenity/pull/23430
1 changed files with 1 additions and 0 deletions
|
@ -621,6 +621,7 @@ void Job::finish_up()
|
|||
return;
|
||||
}
|
||||
|
||||
stop_timer();
|
||||
m_has_scheduled_finish = true;
|
||||
auto response = HttpResponse::create(m_code, move(m_headers), m_received_size);
|
||||
deferred_invoke([this, response = move(response)] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue