From d24da69b11c58f503e37c5dc2e8038d698ffa2ed Mon Sep 17 00:00:00 2001 From: Henry Tsai Date: Wed, 3 Jul 2024 10:20:40 -0700 Subject: [PATCH] Update src/web5-connect/web5-connect-server.ts Co-authored-by: Liran Cohen --- src/web5-connect/web5-connect-server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web5-connect/web5-connect-server.ts b/src/web5-connect/web5-connect-server.ts index 0a6a065..bf2b1a2 100644 --- a/src/web5-connect/web5-connect-server.ts +++ b/src/web5-connect/web5-connect-server.ts @@ -86,9 +86,9 @@ export class Web5ConnectServer { const request = await this.cache.get(`request:${requestId}`); // Delete the Request Object from cache once it has been retrieved. - // IMPORTANT: only delete if object is fetched, otherwise there could be a race condition - // where the object is not fetched in this call but become available immediately right, - // we would end up deleting it before a successful fetch. + // IMPORTANT: only delete if the object exists, otherwise there could be a race condition + // where the object does not exist in this call but becomes available immediately after, + // we would end up deleting it before it is successfully retrieved. if (request !== undefined) { this.cache.delete(`request:${requestId}`); }