From 43a7eb233c71793400e564a304b6b292467671c5 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 a3351ac32f..afedafb295 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();