Fix traffic management in playback tests
This commit is contained in:
parent
39193b2878
commit
255fbe0c9e
|
@ -152,11 +152,12 @@ RecordingPlayer.prototype = {
|
||||||
|
|
||||||
_doPacket: function () {
|
_doPacket: function () {
|
||||||
// Avoid having excessive queue buildup in non-realtime mode
|
// Avoid having excessive queue buildup in non-realtime mode
|
||||||
if (!this._trafficManagement && this._rfb._flushing) {
|
if (this._trafficManagement && this._rfb._flushing) {
|
||||||
let player = this;
|
let player = this;
|
||||||
this._rfb.display.set_onFlush(function () {
|
let orig = this._rfb._display.get_onFlush();
|
||||||
this._rfb._display.set_onFlush(this._rfb._onFlush.bind(this._rfb));
|
this._rfb._display.set_onFlush(function () {
|
||||||
this._rfb._onFlush();
|
player._rfb._display.set_onFlush(orig);
|
||||||
|
player._rfb._onFlush();
|
||||||
player._doPacket();
|
player._doPacket();
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue