From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit 2/2] log/journal view: fix acces to me after destroying
Date: Mon, 21 Nov 2022 08:53:42 +0100 [thread overview]
Message-ID: <20221121075342.291834-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20221121075342.291834-1-d.csapak@proxmox.com>
it can happen that the view is destroyed during an api call,
so we should check if it's destroyed as the first thing in the
callback
if the view is destroyed, there is nothing we can do here, so simply
return
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/panel/JournalView.js | 3 +++
src/panel/LogView.js | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/panel/JournalView.js b/src/panel/JournalView.js
index f3af36b..32c005a 100644
--- a/src/panel/JournalView.js
+++ b/src/panel/JournalView.js
@@ -143,6 +143,9 @@ Ext.define('Proxmox.panel.JournalView', {
waitMsgTarget: !livemode ? view : undefined,
method: 'GET',
success: function(response) {
+ if (me.isDestroyed) {
+ return;
+ }
Proxmox.Utils.setErrorMask(me, false);
let lines = response.result.data;
me.updateView(lines, livemode, top);
diff --git a/src/panel/LogView.js b/src/panel/LogView.js
index dcbd002..44aa8e3 100644
--- a/src/panel/LogView.js
+++ b/src/panel/LogView.js
@@ -98,6 +98,9 @@ Ext.define('Proxmox.panel.LogView', {
params: viewModel.get('params'),
method: 'GET',
success: function(response) {
+ if (me.isDestroyed) {
+ return;
+ }
Proxmox.Utils.setErrorMask(me, false);
let total = response.result.total;
let lines = [];
--
2.30.2
next prev parent reply other threads:[~2022-11-21 7:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 7:53 [pve-devel] [PATCH widget-toolkit 1/2] css: don't make full tags inline-block in the tree Dominik Csapak
2022-11-21 7:53 ` Dominik Csapak [this message]
2022-11-21 7:54 ` [pve-devel] [PATCH widget-toolkit 2/2] log/journal view: fix acces to me after destroying Dominik Csapak
2022-11-21 11:16 ` [pve-devel] applied: [PATCH widget-toolkit 1/2] css: don't make full tags inline-block in the tree Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221121075342.291834-2-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox