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:
Randell Jesup 2016-08-07 13:54:34 -04:00
Родитель 1f1ea0ef58
Коммит e7967913f4
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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);
}, },
/** /**