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:
parent
0fb19b85ca
commit
d136fd75f5
1 changed files with 10 additions and 9 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue