Skip to content

Commit 386d61c

Browse files
authored
5.4.1 Patch: Fix net::ERR_INSUFFICIENT_RESOURCES errors on HTTP2 introduced in 5.4.0 (#418)
1 parent 81035e0 commit 386d61c

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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>

src/persistence/BaseMCWSPersistenceProvider.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff 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
/**

src/services/mcws/MCWSClient.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)