File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " openmct-mcws" ,
3- "version" : " v5.4.0 " ,
3+ "version" : " v5.4.1 " ,
44 "description" : " Open MCT for MCWS" ,
55 "devDependencies" : {
66 "@babel/eslint-parser" : " 7.26.8" ,
Original file line number Diff line number Diff line change 66 <groupId >gov.nasa.arc.wtd</groupId >
77 <artifactId >openmct-client</artifactId >
88 <name >Open MCT for MCWS Client</name >
9- <version >v5.4.0 </version >
9+ <version >v5.4.1 </version >
1010 <packaging >war</packaging >
1111
1212 <properties >
Original file line number Diff line number Diff line change @@ -57,15 +57,25 @@ export default class BaseMCWSPersistenceProvider {
5757 * @returns {Promise.<NamespaceDefinition[]> } persistenceNamespaces
5858 */
5959 async getPersistenceNamespaces ( ) {
60- // get root namespaces, get contained namespaces.
61- if ( ! this . persistenceNamespaces ) {
62- const rootNamespaces = await this . getRootNamespaces ( ) ;
63- const allContainedNamespaces = await this . getAllContainedNamespaces ( rootNamespaces ) ;
60+ // Return cached result if available
61+ if ( this . persistenceNamespaces ) {
62+ return this . persistenceNamespaces ;
63+ }
64+
65+ // If initialization is in progress, wait for it
66+ if ( ! this . persistenceNamespacesPromise ) {
67+ this . persistenceNamespacesPromise = ( async ( ) => {
68+ const rootNamespaces = await this . getRootNamespaces ( ) ;
69+ const allContainedNamespaces = await this . getAllContainedNamespaces ( rootNamespaces ) ;
70+
71+ this . persistenceNamespaces = [ ...rootNamespaces , ...allContainedNamespaces ] ;
72+ delete this . persistenceNamespacesPromise ;
6473
65- this . persistenceNamespaces = [ ...rootNamespaces , ...allContainedNamespaces ] ;
74+ return this . persistenceNamespaces ;
75+ } ) ( ) ;
6676 }
6777
68- return this . persistenceNamespaces ;
78+ return this . persistenceNamespacesPromise ;
6979 }
7080
7181 /**
Original file line number Diff line number Diff line change @@ -60,9 +60,6 @@ class MCWSClient {
6060 delete options . params ;
6161 }
6262
63- // Keepalive
64- options . keepalive = true ;
65-
6663 try {
6764 response = await fetch ( url , options ) ;
6865 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments