Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #562 from alleyinteractive/bug/LEDE-1622-purgeCache
Browse files Browse the repository at this point in the history
Remove call to next() which is causing response to end before write is finished
  • Loading branch information
ostowe authored Jun 17, 2021
2 parents de4007f + d83952f commit 52d5411
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/server/purgeCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const executeStream = async (pipeline, res, key = '') => {
* @param {object} res Response object.
* @returns {*}
*/
const purgeCache = async (req, res, next) => {
const purgeCache = async (req, res) => {
if (!cacheService.client || !cacheService.client.pipeline) {
return res.send('Redis client is not configured.');
}
Expand Down Expand Up @@ -137,8 +137,6 @@ const purgeCache = async (req, res, next) => {
res.write(completeMessage);
return res.end();
}

return next();
};

module.exports = purgeCache;

0 comments on commit 52d5411

Please sign in to comment.