Skip to content

Commit 1ccfa12

Browse files
authored
fixed: media gateway wrong cpu and memory compare (#299)
1 parent bcc13fa commit 1ccfa12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/media_gateway/src/store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl GatewayStore {
9898
}
9999

100100
fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option<u8> {
101-
if ping.memory >= max_cpu {
101+
if ping.cpu >= max_cpu {
102102
return None;
103103
}
104104

@@ -114,7 +114,7 @@ fn node_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Op
114114
}
115115

116116
fn webrtc_usage(ping: &PingEvent, max_cpu: u8, max_memory: u8, max_disk: u8) -> Option<u8> {
117-
if ping.memory >= max_cpu {
117+
if ping.cpu >= max_cpu {
118118
return None;
119119
}
120120

0 commit comments

Comments
 (0)