Merge branch 'auth-interface-update' of https://github.com/micro/go-micro into auth-interface-update

This commit is contained in:
Ben Toogood
2020-04-01 14:25:07 +01:00
9 changed files with 116 additions and 20 deletions

View File

@@ -221,7 +221,9 @@ func (g *grpcClient) stream(ctx context.Context, node *registry.Node, req client
}
// set timeout in nanoseconds
header["timeout"] = fmt.Sprintf("%d", opts.RequestTimeout)
if opts.StreamTimeout > time.Duration(0) {
header["timeout"] = fmt.Sprintf("%d", opts.StreamTimeout)
}
// set the content type for the request
header["x-content-type"] = req.ContentType()