0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

modules/media/download: Minor cleanup.

This commit is contained in:
Jason Volk 2020-03-13 14:51:44 -07:00
parent 0fb19b85ca
commit d136fd75f5

View file

@ -142,15 +142,16 @@ get__download_local(client &client,
})
};
if(unlikely(read != file_size)) log::error
{
m::media::log, "File %s/%s [%s] size mismatch: expected %zu got %zu",
server,
file,
string_view{room.room_id},
file_size,
read
};
if(unlikely(read != file_size))
log::error
{
m::media::log, "File %s/%s [%s] size mismatch: expected %zu got %zu",
server,
file,
string_view{room.room_id},
file_size,
read
};
// Have to kill client here after failing content length expectation.
if(unlikely(read != file_size))