From ce2cd2627754b92fcef8a8b7f64f7101f2de52a8 Mon Sep 17 00:00:00 2001 From: mmcclaskey Date: Mon, 15 Nov 2021 08:19:19 -0500 Subject: [PATCH] Bugfx/kasm 2090 resizing issues (#23) * KASM-2090 work around for incomplete webp images when there are lots of concurrent users on a single session. Unknown root cause, work around will in most cases keep the connection alive. --- core/display.js | 12 ++++++++---- vnc.html | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/core/display.js b/core/display.js index 1e197bd9..9069fa7f 100644 --- a/core/display.js +++ b/core/display.js @@ -410,10 +410,14 @@ export default class Display { } drawImage(img, x, y, w, h) { - if (img.width != w || img.height != h) { - this._drawCtx.drawImage(img, x, y, w, h); - } else { - this._drawCtx.drawImage(img, x, y); + try { + if (img.width != w || img.height != h) { + this._drawCtx.drawImage(img, x, y, w, h); + } else { + this._drawCtx.drawImage(img, x, y); + } + } catch (error) { + Log.Error('Invalid image recieved.'); //KASM-2090 } this._damage(x, y, w, h); } diff --git a/vnc.html b/vnc.html index d55537b9..4025bb6b 100644 --- a/vnc.html +++ b/vnc.html @@ -245,16 +245,6 @@ -
  • - - - 5 -
  • -
  • - - - 5 -
  • @@ -280,6 +270,16 @@
  • + + + 5 +
  • +
  • + + + 5 +
  • +
  • 65 @@ -457,4 +457,4 @@
    - \ No newline at end of file +