Commit c5954785 authored by 神楽坂玲奈's avatar 神楽坂玲奈 Committed by 铃兰

faster packet loss

parent 45c79aeb
Pipeline #16124 passed with stages
in 42 seconds
...@@ -79,10 +79,12 @@ export class Peer implements Hello, PeerQuality, RouterConfig { ...@@ -79,10 +79,12 @@ export class Peer implements Hello, PeerQuality, RouterConfig {
} }
} }
const lost = Math.max(0, (time - this.time) / config.interval - 2);
return { return {
delay: Math.round(this.delay), delay: Math.round(this.delay),
jitter: Math.round(this.jitter), jitter: Math.round(this.jitter),
reliability: this.reliability reliability: Math.max(0, this.reliability - lost / config.history)
}; };
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment