1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:35:07 +00:00

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

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 {