From 12c7c2ec1ac400262882ecd0fe2cab5c183dc27f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 4 Aug 2021 23:40:03 +0100 Subject: [PATCH] check max vs target requests Signed-off-by: Ian Jackson --- src/config.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index a36ec58..a12d1b2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -714,6 +714,15 @@ impl InstanceConfig { )? }; + { + let t = self.target_requests_outstanding; + let m = self.max_requests_outstanding; + if t > m { throw!(anyhow!( + "target_requests_outstanding ({}) > max_requests_outstanding ({})", + t, m + )) } + } + check_batch(self.max_batch_up, "max_batch_up")?; }, @@ -723,8 +732,6 @@ impl InstanceConfig { } check_batch(self.max_batch_down, "max_batch_down")?; }, - - // xxx check target vs max req outstanding } #[throws(AE)] -- 2.30.2