Merge pull request #483 from rshura/lua-pool-prune-fix

Fix lua pool pruning
This commit is contained in:
Josh Baker 2019-08-01 16:53:04 -07:00 committed by GitHub
commit 544c414972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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()
}