From 9cd691afaedfe09fd1e8c4c466a9f159452cfd7e Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Fri, 22 Apr 2022 00:00:31 +0200 Subject: [PATCH] fix return cached score --- backend/src/routes/livepeer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/livepeer.js b/backend/src/routes/livepeer.js index 0b6701d..332b298 100644 --- a/backend/src/routes/livepeer.js +++ b/backend/src/routes/livepeer.js @@ -2526,7 +2526,8 @@ apiRouter.post("/getOrchestratorScores", async (req, res) => { if (thisAddr.year === year && thisAddr.month === month) { // Check timeout if (now - thisAddr.timestamp < 360000) { - return thisAddr; + res.send(thisAddr); + return; } wasInCache = true; }