mirror of https://github.com/tidwall/tile38.git
Fix lua pool pruning
This commit is contained in:
parent
6e98f52769
commit
b9e2c67933
|
@ -85,6 +85,7 @@ func (pl *lStatePool) Prune() {
|
||||||
newSaved := make([]*lua.LState, n-dropNum)
|
newSaved := make([]*lua.LState, n-dropNum)
|
||||||
copy(newSaved, pl.saved[dropNum:])
|
copy(newSaved, pl.saved[dropNum:])
|
||||||
pl.saved = newSaved
|
pl.saved = newSaved
|
||||||
|
pl.total -= dropNum
|
||||||
}
|
}
|
||||||
pl.m.Unlock()
|
pl.m.Unlock()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue