diff --git a/grpc.go b/grpc.go index ba7a384..62b8d5d 100644 --- a/grpc.go +++ b/grpc.go @@ -339,7 +339,9 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface d, ok := ctx.Deadline() if !ok { // no deadline so we create a new one - ctx, _ = context.WithTimeout(ctx, callOpts.RequestTimeout) + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, callOpts.RequestTimeout) + defer cancel() } else { // got a deadline so no need to setup context // but we need to set the timeout we pass along