test connection pools
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 28s
Build and Publish / BuildAndDeploy (push) Successful in 2m32s

This commit is contained in:
matst80
2024-11-21 22:20:41 +01:00
parent 3d55c4ed1f
commit 933f0bb04f
3 changed files with 28 additions and 21 deletions

View File

@@ -394,7 +394,7 @@ func (p *SyncedPool) AddRemote(host string) {
host_pool, err := netpool.New(func() (net.Conn, error) {
return net.Dial("tcp", fmt.Sprintf("%s:1338", host))
}, netpool.WithMaxPool(256))
}, netpool.WithMaxPool(256), netpool.WithMinPool(5))
if err != nil {
log.Printf("Error creating pool: %v\n", err)
@@ -418,7 +418,7 @@ func (p *SyncedPool) AddRemote(host string) {
cart_pool, err := netpool.New(func() (net.Conn, error) {
return net.Dial("tcp", fmt.Sprintf("%s:1337", host))
}, netpool.WithMaxPool(512))
}, netpool.WithMaxPool(1024), netpool.WithMinPool(5))
remote := RemoteHost{
HostPool: cart_pool,