From 1ccfa12e44f445903c42349b793adfdce82a8844 Mon Sep 17 00:00:00 2001 From: giangndm <45644921+giangndm@users.noreply.github.com> Date: Thu, 30 May 2024 03:02:50 +0700 Subject: [PATCH] fixed: media gateway wrong cpu and memory compare (#299) --- packages/media_gateway/src/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/media_gateway/src/store.rs b/packages/media_gateway/src/store.rs index df91afc2..a0da408e 100644 --- a/packages/media_gateway/src/store.rs +++ b/packages/media_gateway/src/store.rs @@ -98,7 +98,7 @@ impl GatewayStore { } fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option { - if ping.memory >= max_cpu { + if ping.cpu >= max_cpu { return None; } @@ -114,7 +114,7 @@ fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Op } fn webrtc_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option { - if ping.memory >= max_cpu { + if ping.cpu >= max_cpu { return None; }