Merge pull request #788 from micro/stream

Revert to creating new connections for stream
This commit is contained in:
Asim Aslam 2019-09-25 15:26:09 +01:00 committed by GitHub
commit 140e3d576c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,7 @@ func (r *rpcClient) stream(ctx context.Context, node *registry.Node, req Request
dOpts = append(dOpts, transport.WithTimeout(opts.DialTimeout)) 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 { if err != nil {
return nil, errors.InternalServerError("go.micro.client", "connection error: %v", err) 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, // signal the end of stream,
sendEOS: true, sendEOS: true,
// release func // release func
release: func(err error) { r.pool.Release(c, err) }, release: func(err error) { c.Close() },
} }
// wait for error response // wait for error response