LibProtocol: Ensure download is finished before invoking on_finished
This commit is contained in:
parent
a8ac8c6a8f
commit
a6b04cf8ef
Notes:
sideshowbarker
2024-07-19 00:18:35 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/a6b04cf8ef8 Pull-request: https://github.com/SerenityOS/serenity/pull/4672 Issue: https://github.com/SerenityOS/serenity/issues/4668 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/tomuta
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ void Download::stream_into(OutputStream& stream)
|
|||
TODO();
|
||||
}
|
||||
|
||||
if (m_internal_stream_data->read_stream.eof() || (m_internal_stream_data->download_done && !m_internal_stream_data->success)) {
|
||||
if (m_internal_stream_data->read_stream.eof() && m_internal_stream_data->download_done) {
|
||||
m_internal_stream_data->read_notifier->close();
|
||||
user_on_finish(m_internal_stream_data->success, m_internal_stream_data->total_size);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue