From f23fd69e7e381bdec5f206c538fff64e9813a123 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Wed, 14 Feb 2024 11:46:43 +0100 Subject: [PATCH] fix(xapi/VIF_create): fetch power_state and MTU in parallel --- @xen-orchestra/xapi/vif.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/@xen-orchestra/xapi/vif.mjs b/@xen-orchestra/xapi/vif.mjs index 764d25698..2e1d5593b 100644 --- a/@xen-orchestra/xapi/vif.mjs +++ b/@xen-orchestra/xapi/vif.mjs @@ -35,9 +35,9 @@ export default class Vif { const [powerState, ...rest] = await Promise.all([ this.getField('VM', VM, 'power_state'), - MTU ?? (await this.getField('network', network, 'MTU')), + MTU ?? this.getField('network', network, 'MTU'), ]) - ;[device, MTU] = rest + ;[MTU] = rest const vifRef = await this.call('VIF.create', { currently_attached: powerState === 'Suspended' ? currently_attached : undefined,