From b9e2c67933190d7c50df8c198aa055d2bba37662 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 1 Aug 2019 11:55:52 -0700 Subject: [PATCH] Fix lua pool pruning --- internal/server/scripts.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/server/scripts.go b/internal/server/scripts.go index 6bc2d6fa..260baf42 100644 --- a/internal/server/scripts.go +++ b/internal/server/scripts.go @@ -85,6 +85,7 @@ func (pl *lStatePool) Prune() { newSaved := make([]*lua.LState, n-dropNum) copy(newSaved, pl.saved[dropNum:]) pl.saved = newSaved + pl.total -= dropNum } pl.m.Unlock() }