diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-06-01 12:50:00 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2017-06-01 12:50:00 +0200 |
commit | 255fbe0c9e93d26b0edc6c33fdd99dd64e7bc976 (patch) | |
tree | a97183022f9481c06fb10a4058d9867d178699dc | |
parent | 39193b28786faabc3da6f02454ec12f83d5bedfc (diff) | |
download | novnc-255fbe0c9e93d26b0edc6c33fdd99dd64e7bc976.tar.gz |
Fix traffic management in playback tests
-rw-r--r-- | tests/playback.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/playback.js b/tests/playback.js index b39c981..745e1f5 100644 --- a/tests/playback.js +++ b/tests/playback.js @@ -152,11 +152,12 @@ RecordingPlayer.prototype = { _doPacket: function () { // Avoid having excessive queue buildup in non-realtime mode - if (!this._trafficManagement && this._rfb._flushing) { + if (this._trafficManagement && this._rfb._flushing) { let player = this; - this._rfb.display.set_onFlush(function () { - this._rfb._display.set_onFlush(this._rfb._onFlush.bind(this._rfb)); - this._rfb._onFlush(); + let orig = this._rfb._display.get_onFlush(); + this._rfb._display.set_onFlush(function () { + player._rfb._display.set_onFlush(orig); + player._rfb._onFlush(); player._doPacket(); }); return; |