Skip to content

Commit

Permalink
Add more logging on fatal errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Mar 8, 2023
1 parent 29f9194 commit 1d476d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion td/telegram/files/PartsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ Status PartsManager::set_known_prefix(size_t size, bool is_ready) {
}

Status PartsManager::on_part_ok(int part_id, size_t part_size, size_t actual_size) {
CHECK(part_status_[part_id] == PartStatus::Pending);
LOG_CHECK(static_cast<size_t>(part_id) < part_status_.size())
<< part_id << ' ' << part_size << ' ' << actual_size << ' ' << *this;
LOG_CHECK(part_status_[part_id] == PartStatus::Pending) << part_id << ' ' << static_cast<int32>(part_status_[part_id])
<< ' ' << part_size << ' ' << actual_size << ' ' << *this;
pending_count_--;

part_status_[part_id] = PartStatus::Ready;
Expand Down

0 comments on commit 1d476d1

Please sign in to comment.