From e770a60c6899be2bdfe0daf62d2fc3eb01aa9233 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 9 Apr 2021 10:54:51 +0200 Subject: [PATCH] Releasing memory. --- server/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/main.ts b/server/main.ts index fe9e4eb4..1c9da1d2 100644 --- a/server/main.ts +++ b/server/main.ts @@ -24,8 +24,10 @@ async function register ({ async function unregister (): Promise { const module = __filename logger?.info(`Unloading module ${module}...`) + // In peertube <= 3.1.0 sub modules are not removed from require.cache decache(module) logger?.info(`Successfully unloaded the module ${module}`) + logger = undefined } module.exports = {