From 830aa19a4fa295be03db9ea7bcae27b2149da750 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 23 Jul 2022 02:49:02 -0400 Subject: [PATCH] *Skip cache update if error is ERR_NOT_READY --- src/rpc.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpc.ts b/src/rpc.ts index f08043a..0559347 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -134,7 +134,10 @@ async function processRequest(request: RPCRequest): Promise { ? { error } : (rpcResp as unknown as JSONRPCResponseWithResult).result; - if (!processedRequests.get(reqId) || request.force) { + if ( + (!processedRequests.get(reqId) || request.force) && + dbData.data?.error !== ERR_NOT_READY + ) { processedRequests.set(reqId, dbData); }