Fix being unable to stop plugin if there is unresolved pending promise

This commit is contained in:
Exidex 2024-08-06 18:16:52 +02:00
parent 7d46fd2b16
commit 06db1ffa30
10 changed files with 105 additions and 76 deletions

View file

@ -68,6 +68,17 @@ export default function DetailView(): ReactElement {
};
}, []);
// promise that takes a long time to resolve
// to test that plugin can be stopped even though there is a pending promise somewhere
new Promise(resolve => {
setTimeout(
() => {
resolve("Promise resolved after 10 minutes!");
},
10 * 60 * 1000
);
})
return (
<Detail
actions={