Fix log check
This commit is contained in:
parent
461d9886ba
commit
801f14fa9c
@ -658,7 +658,10 @@ void PollManager::unregister_poll(PollId poll_id, FullMessageId full_message_id,
|
|||||||
LOG(INFO) << "Unregister " << poll_id << " from " << full_message_id << " from " << source;
|
LOG(INFO) << "Unregister " << poll_id << " from " << full_message_id << " from " << source;
|
||||||
auto &message_ids = poll_messages_[poll_id];
|
auto &message_ids = poll_messages_[poll_id];
|
||||||
auto is_deleted = message_ids.erase(full_message_id) > 0;
|
auto is_deleted = message_ids.erase(full_message_id) > 0;
|
||||||
LOG_CHECK(is_deleted) << source << " " << poll_id << " " << full_message_id;
|
if (!is_deleted) {
|
||||||
|
LOG(ERROR) << "tried to unregister already deleted poll. " << source << " " << poll_id << " " << full_message_id;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (message_ids.empty()) {
|
if (message_ids.empty()) {
|
||||||
poll_messages_.erase(poll_id);
|
poll_messages_.erase(poll_id);
|
||||||
update_poll_timeout_.cancel_timeout(poll_id.get());
|
update_poll_timeout_.cancel_timeout(poll_id.get());
|
||||||
|
Loading…
Reference in New Issue
Block a user