mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
RequestServer: Actually hold on to the preload job until it's done
This was some nonsense code left in by mistake, ref commit:
4211639e45
Fixes #904.
This commit is contained in:
parent
b445b907a1
commit
93216a875e
Notes:
github-actions[bot]
2024-07-30 16:04:27 +00:00
Author: https://github.com/alimpfard Commit: https://github.com/LadybirdBrowser/ladybird/commit/93216a875eb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/905 Reviewed-by: https://github.com/trflynn89 ✅
2 changed files with 2 additions and 3 deletions
|
@ -100,8 +100,7 @@ struct JobData {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename T>
|
static JobData create(auto job, [[maybe_unused]] URL::URL url)
|
||||||
static JobData create(WeakPtr<T> job, [[maybe_unused]] URL::URL url)
|
|
||||||
{
|
{
|
||||||
return JobData {
|
return JobData {
|
||||||
[job](auto& socket) { job->start(socket); },
|
[job](auto& socket) { job->start(socket); },
|
||||||
|
|
|
@ -162,7 +162,7 @@ void ConnectionFromClient::worker_do_work(Work work)
|
||||||
|
|
||||||
dbgln("EnsureConnection: Pre-connect to {}", url);
|
dbgln("EnsureConnection: Pre-connect to {}", url);
|
||||||
auto do_preconnect = [=, job = Job::ensure(url)](auto& cache) {
|
auto do_preconnect = [=, job = Job::ensure(url)](auto& cache) {
|
||||||
ConnectionCache::ensure_connection(cache, url, job->make_weak_ptr<Job>());
|
ConnectionCache::ensure_connection(cache, url, move(job));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (url.scheme() == "http"sv)
|
if (url.scheme() == "http"sv)
|
||||||
|
|
Loading…
Reference in a new issue