From 9bec23aab314261374ebdec41c94d5b25202d6f7 Mon Sep 17 00:00:00 2001 From: Nerivec <62446222+Nerivec@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:12:17 +0200 Subject: [PATCH] fix: Ember: Add keys to adapter queue executors (#1121) --- src/adapter/ember/adapter/emberAdapter.ts | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/adapter/ember/adapter/emberAdapter.ts b/src/adapter/ember/adapter/emberAdapter.ts index 523ec2e1af..fa72c1b9a5 100644 --- a/src/adapter/ember/adapter/emberAdapter.ts +++ b/src/adapter/ember/adapter/emberAdapter.ts @@ -2343,7 +2343,7 @@ export class EmberAdapter extends Adapter { } return {neighbors}; - }); + }, networkAddress); } // queued, non-InterPAN @@ -2399,7 +2399,7 @@ export class EmberAdapter extends Adapter { } return {table}; - }); + }, networkAddress); } // queued, non-InterPAN @@ -2453,7 +2453,7 @@ export class EmberAdapter extends Adapter { } return {type, manufacturerCode: result.manufacturerCode}; - }); + }, networkAddress); } // queued, non-InterPAN @@ -2483,7 +2483,7 @@ export class EmberAdapter extends Adapter { ); return {endpoints: result.endpointList}; - }); + }, networkAddress); } // queued, non-InterPAN @@ -2521,7 +2521,7 @@ export class EmberAdapter extends Adapter { inputClusters: result.inClusterList, outputClusters: result.outClusterList, }; - }); + }, networkAddress); } // queued, non-InterPAN @@ -2570,7 +2570,7 @@ export class EmberAdapter extends Adapter { }, DEFAULT_ZDO_REQUEST_TIMEOUT, ); - }); + }, destinationNetworkAddress); } else if (typeof destinationAddressOrGroup === 'number' && type === 'group') { // dest is group num, so type should always be group (multicast) return this.queue.execute(async () => { @@ -2607,7 +2607,7 @@ export class EmberAdapter extends Adapter { }, DEFAULT_ZDO_REQUEST_TIMEOUT, ); - }); + }, destinationNetworkAddress); } } @@ -2657,10 +2657,10 @@ export class EmberAdapter extends Adapter { }, DEFAULT_ZDO_REQUEST_TIMEOUT, ); - }); + }, destinationNetworkAddress); } else if (typeof destinationAddressOrGroup === 'number' && type === 'group') { // dest is group num, so type should always be group (multicast) - return new Promise(async () => { + return this.queue.execute(async () => { this.checkInterpanLock(); const zdoPayload = BuffaloZdo.buildUnbindRequest( @@ -2694,7 +2694,7 @@ export class EmberAdapter extends Adapter { }, DEFAULT_ZDO_REQUEST_TIMEOUT, ); - }); + }, destinationNetworkAddress); } } @@ -2720,7 +2720,7 @@ export class EmberAdapter extends Adapter { }, DEFAULT_ZDO_REQUEST_TIMEOUT, ); - }); + }, networkAddress); } //---- ZCL @@ -2819,7 +2819,7 @@ export class EmberAdapter extends Adapter { } return null; - }); + }, networkAddress); } // queued, non-InterPAN