mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibCore+RequestServer: Ignore callbacks for cancelled network jobs
Also cancel the jobs when they're destroyed. This makes sure that jobs whose owners have discarded don't end up crashing because of a did_fail().
This commit is contained in:
parent
436693c0c9
commit
81a0301d4d
Notes:
sideshowbarker
2024-07-18 03:39:46 +09:00
Author: https://github.com/alimpfard
Commit: 81a0301d4d
Pull-request: https://github.com/SerenityOS/serenity/pull/10103
Reviewed-by: https://github.com/awesomekling
4 changed files with 12 additions and 3 deletions
|
@ -27,7 +27,7 @@ HttpsRequest::~HttpsRequest()
|
|||
{
|
||||
m_job->on_finish = nullptr;
|
||||
m_job->on_progress = nullptr;
|
||||
m_job->shutdown();
|
||||
m_job->cancel();
|
||||
}
|
||||
|
||||
NonnullOwnPtr<HttpsRequest> HttpsRequest::create_with_job(Badge<HttpsProtocol>&&, ClientConnection& client, NonnullRefPtr<HTTP::HttpsJob> job, NonnullOwnPtr<OutputFileStream>&& output_stream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue