0
0
Fork 0
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:
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, 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