Skip to content

Commit 3b2fa94

Browse files
committed
Fix delay when navigating to a cluster
- `loadCluster` --> `await dispatch('cluster/unsubscribe');` --> cleanupTasks.push(waitFor(() => !this.$workers[getters.storeName], 'Worker is destroyed')); - the waitFor was not immediately resolved, so waited the default 500ms before checking again - for some reason we're now not in the immediate world so wait the 500ms - resolution is to reduce the delay in waitFor to 50ms
1 parent c0ddf99 commit 3b2fa94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shell/plugins/steve/subscribe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ const sharedActions = {
470470

471471
if (worker) {
472472
worker.postMessage({ destroyWorker: true }); // we're only passing the boolean here because the key needs to be something truthy to ensure it's passed on the object.
473-
cleanupTasks.push(waitFor(() => !this.$workers[getters.storeName], 'Worker is destroyed'));
473+
cleanupTasks.push(waitFor(() => !this.$workers[getters.storeName], 'Worker is destroyed', 3000000, 50));
474474
}
475475

476476
if ( socket ) {

0 commit comments

Comments
 (0)