mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00: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
1 changed files with 1 additions and 0 deletions
|
@ -621,6 +621,7 @@ void Job::finish_up()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stop_timer();
|
||||||
m_has_scheduled_finish = true;
|
m_has_scheduled_finish = true;
|
||||||
auto response = HttpResponse::create(m_code, move(m_headers), m_received_size);
|
auto response = HttpResponse::create(m_code, move(m_headers), m_received_size);
|
||||||
deferred_invoke([this, response = move(response)] {
|
deferred_invoke([this, response = move(response)] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue