From 0dfa5fddd47b728ccf25c88c19798cf8bc475971 Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Sat, 15 Jun 2019 23:34:20 -0400 Subject: [PATCH] Fix cleanup not deleting containers from memory --- src/struct/LanguageHandler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/struct/LanguageHandler.js b/src/struct/LanguageHandler.js index 5107f91..9eeee3b 100644 --- a/src/struct/LanguageHandler.js +++ b/src/struct/LanguageHandler.js @@ -208,7 +208,10 @@ class LanguageHandler extends AkairoHandler { } cleanup() { - return Promise.all(this.containers.map(({ name }) => this.kill(name))); + return Promise.all(this.containers.map(({ name }, dockerID) => { + this.containers.delete(dockerID); + return this.kill(name); + })); } getCompilerConfig(dockerID, key, type) {