mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd::server: Avoid unnecessary tail call on empty overrun buffer.
This commit is contained in:
parent
1e45ffcba2
commit
ca8dcb3271
1 changed files with 2 additions and 2 deletions
|
@ -3170,7 +3170,7 @@ ircd::server::tag::read_chunk_head(const const_buffer &buffer,
|
|||
assert(state.chunk_length >= 2);
|
||||
read_chunk_content(partial_chunk, done);
|
||||
|
||||
if(done)
|
||||
if(done || empty(overrun))
|
||||
return overrun;
|
||||
|
||||
// Prevent stack overflow from lots of tiny chunks nagled together.
|
||||
|
@ -3384,7 +3384,7 @@ ircd::server::tag::read_chunk_dynamic_head(const const_buffer &buffer,
|
|||
assert(state.chunk_length >= 2);
|
||||
read_chunk_dynamic_content(partial_chunk, done);
|
||||
|
||||
if(done)
|
||||
if(done || empty(overrun))
|
||||
return overrun;
|
||||
|
||||
// Prevent stack overflow from lots of tiny chunks nagled together.
|
||||
|
|
Loading…
Reference in a new issue