From afa1f50435fcb14ead48306f493e8b3b330d3007 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 25 Sep 2019 15:21:21 +0100 Subject: [PATCH] Revert to creating new connections for stream --- client/rpc_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rpc_client.go b/client/rpc_client.go index 2fe51934..0a5a0580 100644 --- a/client/rpc_client.go +++ b/client/rpc_client.go @@ -220,7 +220,7 @@ func (r *rpcClient) stream(ctx context.Context, node *registry.Node, req Request dOpts = append(dOpts, transport.WithTimeout(opts.DialTimeout)) } - c, err := r.pool.Get(address, dOpts...) + c, err := r.opts.Transport.Dial(address, dOpts...) if err != nil { return nil, errors.InternalServerError("go.micro.client", "connection error: %v", err) } @@ -254,7 +254,7 @@ func (r *rpcClient) stream(ctx context.Context, node *registry.Node, req Request // signal the end of stream, sendEOS: true, // release func - release: func(err error) { r.pool.Release(c, err) }, + release: func(err error) { c.Close() }, } // wait for error response