Clear worker key caches in openpgp.destroyWorker()
This commit is contained in:
parent
fb666f0624
commit
66acd979bf
|
@ -89,10 +89,12 @@ export function getWorker() {
|
||||||
/**
|
/**
|
||||||
* Cleanup the current instance of the web worker.
|
* Cleanup the current instance of the web worker.
|
||||||
*/
|
*/
|
||||||
export function destroyWorker() {
|
export async function destroyWorker() {
|
||||||
if (asyncProxy) {
|
const proxy = asyncProxy;
|
||||||
asyncProxy.terminate();
|
asyncProxy = undefined;
|
||||||
asyncProxy = undefined;
|
if (proxy) {
|
||||||
|
await proxy.clearKeyCache();
|
||||||
|
proxy.terminate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user