From c819c5cffef2f872e2014f73df7101208397bbf1 Mon Sep 17 00:00:00 2001 From: Xiaobo Liu Date: Thu, 11 Jan 2024 20:41:41 +0800 Subject: [PATCH] server: fixed wrong nfqueue worker count (#8) Signed-off-by: Xiaobo Liu --- server/src/bin/server.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/src/bin/server.rs b/server/src/bin/server.rs index 94d97ec..0bd0b80 100644 --- a/server/src/bin/server.rs +++ b/server/src/bin/server.rs @@ -46,10 +46,9 @@ fn main() -> Result<()> { let conntrack_map = Arc::new(ConntrackMap::new()); - for i in 0..config.setting.queue_count { - let queue_id = config.setting.queue_start + i; - - let worker = Worker::new(config.clone(), queue_id, conntrack_map.clone())?; + let queue_count = config.setting.queue_start + config.setting.queue_count; + for queue_num in config.setting.queue_start..=queue_count { + let worker = Worker::new(config.clone(), queue_num, conntrack_map.clone())?; worker.start()?; }