Software /
code /
prosody
Changeset
12762:79b89f382290
util.dbuffer: Remove redundant code (read_chunk() cannot fail at this point)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 11 Oct 2022 11:34:47 +0100 |
parents | 12761:82915c755d90 |
children | 12763:d26eefe98d09 |
files | util/dbuffer.lua |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dbuffer.lua Sun Oct 09 15:50:25 2022 +0200 +++ b/util/dbuffer.lua Tue Oct 11 11:34:47 2022 +0100 @@ -96,13 +96,9 @@ end local chunk, read_bytes = self:read_chunk(requested_bytes); - if chunk then - requested_bytes = requested_bytes - read_bytes; - if requested_bytes == 0 then -- Already read everything we need - return true; - end - else - return nil; + requested_bytes = requested_bytes - read_bytes; + if requested_bytes == 0 then -- Already read everything we need + return true; end while chunk do