Better fatal error message on message_id overflow.
GitOrigin-RevId: d920ec7f39d43bd8578a49f85567949a14edcff2
This commit is contained in:
parent
a7ef1062a5
commit
3bf9bae32f
@ -20414,7 +20414,10 @@ MessageId MessagesManager::get_next_message_id(Dialog *d, int32 type) {
|
||||
|
||||
int64 base = (last + MessageId::TYPE_MASK + 1) & ~MessageId::TYPE_MASK;
|
||||
d->last_assigned_message_id = MessageId(base + type);
|
||||
LOG_CHECK(d->last_assigned_message_id.is_valid()) << d->last_assigned_message_id;
|
||||
if (d->last_assigned_message_id.get() > MessageId::max().get()) {
|
||||
LOG(FATAL) << "Force restart because of message_id overflow: " << d->last_assigned_message_id;
|
||||
}
|
||||
CHECK(d->last_assigned_message_id.is_valid());
|
||||
return d->last_assigned_message_id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user