diff options
author | Florian Dold <florian@dold.me> | 2022-03-23 13:11:36 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-23 13:11:36 +0100 |
commit | c539d1803c1376cba0831be64866b6d2c1652403 (patch) | |
tree | 20104848bee6fff74ab40d0f8be646d63c6ef9d5 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | 739c2f933770206b173a9b3cbafa79ee6048ff9d (diff) | |
download | wallet-core-c539d1803c1376cba0831be64866b6d2c1652403.tar.xz |
wallet: address crypto worker hang and warning about worker termination
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 7753992f7..c422674a9 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -61,13 +61,12 @@ import { AbsoluteTime, URL, } from "@gnu-taler/taler-util"; -import { guardOperationException } from "../errors.js"; import { updateExchangeFromUrl } from "./exchanges.js"; import { DenomInfo, EXCHANGE_COINS_LOCK, InternalWalletState, -} from "../common.js"; +} from "../internal-wallet-state.js"; import { isWithdrawableDenom, selectWithdrawalDenominations, @@ -78,6 +77,8 @@ import { } from "../crypto/cryptoTypes.js"; import { GetReadWriteAccess } from "../util/query.js"; import { CryptoApi } from "../index.browser.js"; +import { guardOperationException } from "./common.js"; +import { CryptoApiStoppedError } from "../crypto/workers/cryptoApi.js"; const logger = new Logger("refresh.ts"); @@ -944,6 +945,9 @@ export async function createRefreshGroup( logger.info(`created refresh group ${refreshGroupId}`); processRefreshGroup(ws, refreshGroupId).catch((e) => { + if (e instanceof CryptoApiStoppedError) { + return; + } logger.warn(`processing refresh group ${refreshGroupId} failed: ${e}`); }); |