From 9fa69225c8f45981eefb46db5be34c300e427152 Mon Sep 17 00:00:00 2001 From: matst80 Date: Tue, 18 Mar 2025 19:20:53 +0100 Subject: [PATCH] update pool settings --- synced-pool.go | 2 +- tcp-connection_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synced-pool.go b/synced-pool.go index 2d6bf76..7557899 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -408,7 +408,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(1024), netpool.WithMinPool(5)) + }, netpool.WithMaxPool(128), netpool.WithMinPool(16)) if err != nil { log.Printf("Error creating pool: %v\n", err) diff --git a/tcp-connection_test.go b/tcp-connection_test.go index 7f72270..b326271 100644 --- a/tcp-connection_test.go +++ b/tcp-connection_test.go @@ -17,7 +17,7 @@ func TestGenericConnection(t *testing.T) { } pool, err := netpool.New(func() (net.Conn, error) { return net.Dial("tcp", "127.0.0.1:51337") - }, netpool.WithMaxPool(512), netpool.WithMinPool(5)) + }, netpool.WithMaxPool(128), netpool.WithMinPool(16)) if err != nil { t.Errorf("Error creating pool: %v\n", err) }