diff --git a/package.json b/package.json
index 320c3ad..bf737b3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "openmct-mcws",
- "version": "v5.4.0",
+ "version": "v5.4.1",
"description": "Open MCT for MCWS",
"devDependencies": {
"@babel/eslint-parser": "7.26.8",
diff --git a/pom.xml b/pom.xml
index 10b8f75..96cf7e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
gov.nasa.arc.wtd
openmct-client
Open MCT for MCWS Client
- v5.4.0
+ v5.4.1
war
diff --git a/src/persistence/BaseMCWSPersistenceProvider.js b/src/persistence/BaseMCWSPersistenceProvider.js
index 8e02d65..5edcbf5 100644
--- a/src/persistence/BaseMCWSPersistenceProvider.js
+++ b/src/persistence/BaseMCWSPersistenceProvider.js
@@ -57,15 +57,25 @@ export default class BaseMCWSPersistenceProvider {
* @returns {Promise.} persistenceNamespaces
*/
async getPersistenceNamespaces() {
- // get root namespaces, get contained namespaces.
- if (!this.persistenceNamespaces) {
- const rootNamespaces = await this.getRootNamespaces();
- const allContainedNamespaces = await this.getAllContainedNamespaces(rootNamespaces);
+ // Return cached result if available
+ if (this.persistenceNamespaces) {
+ return this.persistenceNamespaces;
+ }
+
+ // If initialization is in progress, wait for it
+ if (!this.persistenceNamespacesPromise) {
+ this.persistenceNamespacesPromise = (async () => {
+ const rootNamespaces = await this.getRootNamespaces();
+ const allContainedNamespaces = await this.getAllContainedNamespaces(rootNamespaces);
+
+ this.persistenceNamespaces = [...rootNamespaces, ...allContainedNamespaces];
+ delete this.persistenceNamespacesPromise;
- this.persistenceNamespaces = [...rootNamespaces, ...allContainedNamespaces];
+ return this.persistenceNamespaces;
+ })();
}
- return this.persistenceNamespaces;
+ return this.persistenceNamespacesPromise;
}
/**
diff --git a/src/services/mcws/MCWSClient.js b/src/services/mcws/MCWSClient.js
index 1354389..57fa427 100644
--- a/src/services/mcws/MCWSClient.js
+++ b/src/services/mcws/MCWSClient.js
@@ -60,9 +60,6 @@ class MCWSClient {
delete options.params;
}
- // Keepalive
- options.keepalive = true;
-
try {
response = await fetch(url, options);
} catch (error) {