зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271585: Use longer retries for stats checks after the first one r=drno
To reduce load from running the checks
This commit is contained in:
Родитель
1f1ea0ef58
Коммит
e7967913f4
|
@ -1460,10 +1460,10 @@ PeerConnectionWrapper.prototype = {
|
||||||
|
|
||||||
info("Checking RTP packet flow for track " + track.id);
|
info("Checking RTP packet flow for track " + track.id);
|
||||||
|
|
||||||
var retry = () => this._pc.getStats(track)
|
var retry = (delay) => this._pc.getStats(track)
|
||||||
.then(stats => hasFlow(stats)? ok(true, "RTP flowing for track " + track.id) :
|
.then(stats => hasFlow(stats)? ok(true, "RTP flowing for track " + track.id) :
|
||||||
wait(200).then(retry));
|
wait(delay).then(retry(1000)));
|
||||||
return retry();
|
return retry(200);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче