solve 'edge' case and pass cancellation token
This commit is contained in:
parent
0472bfe58e
commit
d3dfdd6a74
15 changed files with 208 additions and 551 deletions
|
|
@ -30,7 +30,7 @@ public static class ImageController
|
|||
|
||||
await tileManager
|
||||
.CreateSection(dto)
|
||||
.DangerousWriteToPipe(response.BodyWriter, dto.OutputScale, cancellationToken);
|
||||
.WriteToPipe(response.BodyWriter, dto.OutputScale, cancellationToken);
|
||||
|
||||
await response.CompleteAsync();
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public static class ImageController
|
|||
var scale = float.Clamp(480f / int.Max(section.Width, section.Height), 0.01f, 1f);
|
||||
Console.WriteLine($"Generate random image for {coordinatePair} scale: {scale}");
|
||||
|
||||
await section.DangerousWriteToPipe(response.BodyWriter, scale, cancellationToken);
|
||||
await section.WriteToPipe(response.BodyWriter, scale, cancellationToken);
|
||||
await response.CompleteAsync();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue