mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +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:
parent
2a7cb4fe42
commit
55fa2329de
Notes:
sideshowbarker
2024-07-18 11:24:23 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/55fa2329de9 Pull-request: https://github.com/SerenityOS/serenity/pull/8288 Issue: https://github.com/SerenityOS/serenity/issues/8211
2 changed files with 1 additions and 3 deletions
|
@ -38,9 +38,6 @@ void HttpsJob::start()
|
|||
});
|
||||
}
|
||||
};
|
||||
m_socket->on_tls_finished = [&] {
|
||||
finish_up();
|
||||
};
|
||||
m_socket->on_tls_certificate_request = [this](auto&) {
|
||||
if (on_certificate_requested)
|
||||
on_certificate_requested(*this);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue