Merge pull request #717 from micro/client-stream
use with stream for client connection
This commit is contained in:
		| @@ -96,7 +96,15 @@ func (r *rpcClient) call(ctx context.Context, node *registry.Node, req Request, | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	c, err := r.pool.Get(address, transport.WithTimeout(opts.DialTimeout)) | 	dOpts := []transport.DialOption{ | ||||||
|  | 		transport.WithStream(), | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	if opts.DialTimeout >= 0 { | ||||||
|  | 		dOpts = append(dOpts, transport.WithTimeout(opts.DialTimeout)) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	c, err := r.pool.Get(address, dOpts...) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return errors.InternalServerError("go.micro.client", "connection error: %v", err) | 		return errors.InternalServerError("go.micro.client", "connection error: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user