mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-14 15:58:32 +01:00
normalize negative pool size
This commit is contained in:
1 parent
caee2a55f4
commit
a12bccaafc
2 files changed
+5
-1
No files matched your search
+1
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
- Updated `modernc.org/sqlite` to 1.59.0 _(minor performance improvement by switching to Go's `memmove`)_.
|
||||
|
||||
- Other minor changes (godoc typos).
|
||||
- Other minor fixes (godoc typos, normalize negative jsvm pool size, etc.).
|
||||
|
||||
|
||||
## v0.40.4
|
||||
|
||||
@@ -20,6 +20,10 @@ type vmsPool struct {
|
||||
|
||||
// newPool creates a new pool with pre-warmed vms generated from the specified factory.
|
||||
func newPool(size int, factory func() *goja.Runtime) *vmsPool {
|
||||
if size < 0 {
|
||||
size = 0
|
||||
}
|
||||
|
||||
pool := &vmsPool{
|
||||
factory: factory,
|
||||
items: make([]*poolItem, size),
|
||||
|
||||
Reference in new issue
Block a user