server : fix server_tokens clear()

This commit is contained in:
Georgi Gerganov
2025-10-30 20:15:13 +02:00
parent 4e9e319b1c
commit a5d27aafe3
2 changed files with 6 additions and 4 deletions

View File

@@ -1210,7 +1210,7 @@ public:
for (auto it = tokens.map_idx_to_media.begin(); it != tokens.map_idx_to_media.end(); ) {
auto * chunk = tokens.map_idx_to_media[it->first].get();
mtmd::input_chunk_ptr new_chunk(mtmd_input_chunk_copy(chunk));
map_idx_to_media[start_idx+it->first] = std::move(new_chunk);
map_idx_to_media[start_idx + it->first] = std::move(new_chunk);
}
}
}
@@ -1242,6 +1242,7 @@ public:
}
void clear() {
map_idx_to_media.clear();
tokens.clear();
}