diff --git a/synced-pool.go b/synced-pool.go index 860de7c..3a4761b 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -391,7 +391,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.WithMinPool(5)) + }, netpool.WithMaxPool(1024), netpool.WithMinPool(5)) if err != nil { log.Printf("Error creating pool: %v\n", err) diff --git a/tcp-connection.go b/tcp-connection.go index e9700ac..0078256 100644 --- a/tcp-connection.go +++ b/tcp-connection.go @@ -112,12 +112,14 @@ func (c *Connection) Call(msg FrameType, data []byte) (*FrameWithPayload, error) defer c.pool.Put(conn, err) // conn.Close() defer close(ch) - select { - case ret := <-ch: - return &ret, nil - case <-time.After(MaxCallDuration): - return nil, fmt.Errorf("timeout waiting for frame") - } + ret := <-ch + return &ret, nil + // select { + // case ret := <-ch: + // return &ret, nil + // case <-time.After(MaxCallDuration): + // return nil, fmt.Errorf("timeout waiting for frame") + // } } func WaitForFrame(conn net.Conn, resultChan chan<- FrameWithPayload) error {