use the same context object in order to retry

This commit is contained in:
Chris Lu
2020-01-26 14:42:11 -08:00
parent 0c298ef890
commit 72a64a5cf8
51 changed files with 121 additions and 121 deletions

View File

@@ -125,9 +125,9 @@ func withMasterClient(ctx context.Context, master string, grpcDialOption grpc.Di
return fmt.Errorf("failed to parse master grpc %v: %v", master, parseErr)
}
return util.WithCachedGrpcClient(ctx, func(grpcConnection *grpc.ClientConn) error {
return util.WithCachedGrpcClient(ctx, func(ctx2 context.Context, grpcConnection *grpc.ClientConn) error {
client := master_pb.NewSeaweedClient(grpcConnection)
return fn(ctx, client)
return fn(ctx2, client)
}, masterGrpcAddress, grpcDialOption)
}