Skip to content

Commit

Permalink
Merge pull request #80 from Azhrak/patch-1
Browse files Browse the repository at this point in the history
Return immediately if client is ready
  • Loading branch information
derrickmehaffy authored Mar 12, 2024
2 parents 6906cab + 4e43aa6 commit ad7b5a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/strapi-provider-rest-cache-redis/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function waitForRedis(client) {
);
};

if (client.status === "ready") {
return onReady();
}

client.once("ready", onReady);
client.once("error", onError);
});
Expand Down

0 comments on commit ad7b5a8

Please sign in to comment.