From f79000b18d2150c29d2cda9b3ff5f228c73c8d4d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 13 May 2018 19:23:23 -0700 Subject: [PATCH] modules/client/sync: Add flush high-watermark conf item. --- modules/client/sync.cc | 7 +++++++ modules/client/sync.int.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/client/sync.cc b/modules/client/sync.cc index d79fb176c..6aed0aebf 100644 --- a/modules/client/sync.cc +++ b/modules/client/sync.cc @@ -89,6 +89,13 @@ sync_timeout_default { "default", 10 * 1000L }, }; +conf::item +sync_flush_hiwat +{ + { "name", "ircd.client.sync.flush.hiwat" }, + { "default", long(24_KiB) }, +}; + syncargs::syncargs(const resource::request &request) :filter_id { diff --git a/modules/client/sync.int.h b/modules/client/sync.int.h index 7dafb5d78..4f763e321 100644 --- a/modules/client/sync.int.h +++ b/modules/client/sync.int.h @@ -10,6 +10,8 @@ using namespace ircd; +extern conf::item sync_flush_hiwat; + /// Argument parser for the client's /sync request struct syncargs { @@ -85,7 +87,8 @@ struct shortpoll response->write(buf); return buf; - } + }, + size_t(sync_flush_hiwat) }; shortpoll(ircd::client &client,