1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

LibHTTP: Ensure finish_up() is not called more than once

There's no reason to manually call it on TLS close, the HTTP reading
logic is smart enough to handle connection closes transparently.
Fixes #8211.
This commit is contained in:
Ali Mohammad Pur 2021-06-28 16:12:04 +04:30 committed by Andreas Kling
parent 2a7cb4fe42
commit 55fa2329de
2 changed files with 1 additions and 3 deletions

View file

@ -360,6 +360,7 @@ void Job::timer_event(Core::TimerEvent& event)
void Job::finish_up()
{
VERIFY(m_state != State::Finished);
m_state = State::Finished;
if (!m_can_stream_response) {
auto flattened_buffer = ByteBuffer::create_uninitialized(m_received_size);