From a715462b650606e42120ed500db9890963299585 Mon Sep 17 00:00:00 2001 From: 2vg Date: Fri, 27 Jul 2018 17:33:21 +0900 Subject: [PATCH] fix: critical memory leak. --- src/daemons/server-stats.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/daemons/server-stats.ts b/src/daemons/server-stats.ts index a3351ac32..afedafb29 100644 --- a/src/daemons/server-stats.ts +++ b/src/daemons/server-stats.ts @@ -35,6 +35,7 @@ export default function() { }; ev.emit('serverStats', stats); log.push(stats); + if (log.length > 50) log.shift(); } tick();