fix(maps): cancel stale tile rendering safely

This commit is contained in:
Torlando
2026-08-20 04:53:00 +00:00
parent d9cb64a1ea
commit 7c96ffac82
7 changed files with 92 additions and 22 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ void testEveryOpenedFailureCloses() {
void testStopMidReadCloses() {
beginTest(); Stop stop; Stream stream; stream.stop = &stop; std::uint8_t output[8] = {}; std::size_t total = 0U;
CHECK(MapTileStreamReader::readExact(stream, stop, TileKey{1U,0U,0U}, output, sizeof(output), 1U, total) == MapTileStreamResult::IO_ERROR);
CHECK(MapTileStreamReader::readExact(stream, stop, TileKey{1U,0U,0U}, output, sizeof(output), 1U, total) == MapTileStreamResult::CANCELLED);
CHECK(stream.read_calls == 1U && stream.end_calls == 1U);
}
}