Releasing memory.

This commit is contained in:
John Livingston 2021-04-09 10:54:51 +02:00
parent 0bad31dddb
commit e770a60c68

View File

@ -24,8 +24,10 @@ async function register ({
async function unregister (): Promise<any> {
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 = {