Skip to content

Commit 7ee72bf

Browse files
committed
fix race condition
1 parent 2638f13 commit 7ee72bf

File tree

1 file changed

+3
-4
lines changed
  • services/static-webserver/client/source/class/osparc/store

1 file changed

+3
-4
lines changed

services/static-webserver/client/source/class/osparc/store/Services.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,16 @@ qx.Class.define("osparc.store.Services", {
130130
this.__addHit(service);
131131
this.__addTSRInfo(service);
132132
this.__addExtraTypeInfo(service);
133-
this.__addServiceToCache(service)
133+
this.__addServiceToCache(service);
134+
delete this.__servicesPromisesCached[key][version];
134135
resolve(service);
135136
})
136137
.catch(err => {
137138
// store it in cache to avoid asking again
138139
this.__addToCache(key, version, null);
140+
delete this.__servicesPromisesCached[key][version];
139141
console.error(err);
140142
reject();
141-
})
142-
.finally(() => {
143-
delete this.__servicesPromisesCached[key][version];
144143
});
145144
});
146145
},

0 commit comments

Comments
 (0)