go-tdlib
go-tdlib copied to clipboard
After few minutes of running listener stops getting updates
After few minutes of running listener stops getting updates.
yes,you can write a event func on the update channel by yourself
the update channel is fulled
I also encountered this problem and I printed updates with length 0
updates := tdlibClient.GetListener().Updates
for update := range updates {
switch update.GetType() {
case client.TypeUpdateNewMessage:
newMessage, ok := update.(*client.UpdateNewMessage)
if !ok {
log.ZInfo(ctx, "Update", "updates", len(updates))
continue
}
log.ZInfo(ctx, "Update", "class", update.GetClass(), "updates", len(updates))
handlerMsg(ctx, newMessage.Message)
default:
log.ZInfo(ctx, "Update", "class", update.GetType(), "class", update.GetClass(), "updates", len(updates))
continue
}
}
Do I need to consume Updates elsewhere? When I added a brand new user, I got stuck when I got close to 1000 messages after the first launch. But it worked the second time. What do I need to do on the first boot?
Do I need to consume Updates elsewhere?
Yes, you have to consume Updates
completely rewritten in v1.0.0-beta1