chiark / gitweb /
max_batch_up: Make it a limit on the server: fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 14:09:30 +0000 (15:09 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 14:09:30 +0000 (15:09 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs

index 93cc168eb8cef74c7cc9823813f59f5c8370d310..905d4613c83fac2dbb117300cd455f7c878454a0 100644 (file)
@@ -17,7 +17,7 @@ pub struct InstanceConfig {
   #[limited]    pub max_queue_time:               Duration,
   #[limited]    pub http_timeout:                 Duration,
   #[limited]    pub target_requests_outstanding:  u32,
-  #[special(special_max_up, SKL::PerClient)]  pub max_batch_up: u32,
+  #[special(special_max_up, SKL::Limited)]  pub max_batch_up: u32,
 
   // Ordinary settings, used by both, not client-specifi:
   #[global]  pub addrs:                        Vec<IpAddr>,
@@ -692,9 +692,9 @@ impl<'c> ResolveContext<'c> {
 
   #[throws(AE)]
   pub fn special_max_up(&self, key: &'static str, skl: SKL) -> u32 {
-    assert_eq!(skl, SKL::None);
+    assert_eq!(skl, SKL::Limited);
     match self.end {
-      LinkEnd::Client => self.ordinary(key, SKL::PerClient)?,
+      LinkEnd::Client => self.ordinary(key, SKL::Limited)?,
       LinkEnd::Server => self.ordinary(key, SKL::Limits)?,
     }
   }