LibProtocol: Ensure download is finished before invoking on_finished

This commit is contained in:
AnotherTest 2020-12-31 01:11:59 +03:30 committed by Andreas Kling
parent a8ac8c6a8f
commit a6b04cf8ef
Notes: sideshowbarker 2024-07-19 00:18:35 +09:00

View file

@ -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 {