diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-06-28 16:12:04 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-28 16:35:04 +0200 |
commit | 55fa2329de95eec80a8d4484e68562a11bd23524 (patch) | |
tree | cb7eeec2e0fd527d5c5401fefc5e2ecc7541ff45 /Userland/Libraries/LibHTTP/Job.cpp | |
parent | 2a7cb4fe4234c2ed72de73102655d2c766dd4ab2 (diff) | |
download | serenity-55fa2329de95eec80a8d4484e68562a11bd23524.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibHTTP/Job.cpp')
-rw-r--r-- | Userland/Libraries/LibHTTP/Job.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp index c500fef356..329e5de23c 100644 --- a/Userland/Libraries/LibHTTP/Job.cpp +++ b/Userland/Libraries/LibHTTP/Job.cpp @@ -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); |