0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 03:38:53 +02:00

modules/client/sync: Use better flush() path.

This commit is contained in:
Jason Volk 2019-02-28 16:22:14 -08:00
parent c90d05a878
commit 70173f5893

View file

@ -184,21 +184,18 @@ ircd::m::sync::flush(data &data,
resource::response::chunked &response,
const const_buffer &buffer)
{
const size_t wrote
const auto wrote
{
response.write(buffer)
response.flush(buffer)
};
if(data.stats)
{
data.stats->flush_bytes += wrote;
data.stats->flush_bytes += size(wrote);
data.stats->flush_count++;
}
return const_buffer
{
buffer::data(buffer), wrote
};
return wrote;
}
// polylog