mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 06:51:08 +01:00
modules/client/sync: Use better flush() path.
This commit is contained in:
parent
c90d05a878
commit
70173f5893
1 changed files with 4 additions and 7 deletions
|
@ -184,21 +184,18 @@ ircd::m::sync::flush(data &data,
|
||||||
resource::response::chunked &response,
|
resource::response::chunked &response,
|
||||||
const const_buffer &buffer)
|
const const_buffer &buffer)
|
||||||
{
|
{
|
||||||
const size_t wrote
|
const auto wrote
|
||||||
{
|
{
|
||||||
response.write(buffer)
|
response.flush(buffer)
|
||||||
};
|
};
|
||||||
|
|
||||||
if(data.stats)
|
if(data.stats)
|
||||||
{
|
{
|
||||||
data.stats->flush_bytes += wrote;
|
data.stats->flush_bytes += size(wrote);
|
||||||
data.stats->flush_count++;
|
data.stats->flush_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return const_buffer
|
return wrote;
|
||||||
{
|
|
||||||
buffer::data(buffer), wrote
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// polylog
|
// polylog
|
||||||
|
|
Loading…
Reference in a new issue