From 43c63d03cd021f30731e22c447a0f6e49286912b Mon Sep 17 00:00:00 2001 From: leslie Date: Mon, 6 May 2019 18:36:51 +0800 Subject: [PATCH] fix warden client metadta range --- pkg/net/rpc/warden/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/net/rpc/warden/client.go b/pkg/net/rpc/warden/client.go index 3450fad70..f8b2395e5 100644 --- a/pkg/net/rpc/warden/client.go +++ b/pkg/net/rpc/warden/client.go @@ -107,6 +107,8 @@ func (c *Client) handle() grpc.UnaryClientInterceptor { return } defer onBreaker(brk, &err) + _, ctx, cancel = conf.Timeout.Shrink(ctx) + defer cancel() nmd.Range(ctx, func(key string, value interface{}) { if valstr, ok := value.(string); ok {