diff options
author | Conrad Pankoff <deoxxa@fknsrs.biz> | 2020-05-17 10:29:20 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-17 12:41:38 +0200 |
commit | 87cb28fcf759db86261f092d425b81a8261bf83e (patch) | |
tree | 2bf8966dfe61ffa780f9ff1e22e7a49d5f64ddeb | |
parent | 4214680e7671fd39daa840302fcdb19313559f35 (diff) | |
download | serenity-87cb28fcf759db86261f092d425b81a8261bf83e.zip |
LibGemini+LibHTTP: Defer did_progress call to match other callbacks
-rw-r--r-- | Libraries/LibGemini/Job.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibHTTP/Job.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGemini/Job.cpp b/Libraries/LibGemini/Job.cpp index 5d22e2427f..dc799f0c19 100644 --- a/Libraries/LibGemini/Job.cpp +++ b/Libraries/LibGemini/Job.cpp @@ -127,7 +127,7 @@ void Job::on_socket_connected() m_received_buffers.append(payload); m_received_size += payload.size(); - did_progress({}, m_received_size); + deferred_invoke([this](auto&) { did_progress({}, m_received_size); }); return IterationDecision::Continue; }); diff --git a/Libraries/LibHTTP/Job.cpp b/Libraries/LibHTTP/Job.cpp index dd6e5ae667..f7b4a796d7 100644 --- a/Libraries/LibHTTP/Job.cpp +++ b/Libraries/LibHTTP/Job.cpp @@ -268,7 +268,7 @@ void Job::on_socket_connected() content_length = length; } - did_progress(content_length, m_received_size); + deferred_invoke([this, content_length](auto&) { did_progress(content_length, m_received_size); }); if (content_length.has_value()) { auto length = content_length.value(); |