Commit 4be39a45 authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent eb4154db
Pipeline #15916 passed with stages
in 36 seconds
...@@ -51,14 +51,12 @@ export class Peer implements PeerMessage, PeerQuality, RouterConfig { ...@@ -51,14 +51,12 @@ export class Peer implements PeerMessage, PeerQuality, RouterConfig {
} }
update(time: number): PeerQuality { update(time: number): PeerQuality {
if (this.reliability === 0) { if (this.reliability > 0) {
return; // 有几个包没到
} const step = Math.floor((time - this.time + this.delay - config.interval) / config.interval);
if (step > config.timeout) {
// 有几个包没到 this.reset();
const step = Math.floor((time - this.time + this.delay - config.interval) / config.interval); }
if (step > config.timeout) {
this.reset();
} }
return { return {
......
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