Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After few minutes of running listener stops getting updates #137

Open
purex121 opened this issue Apr 15, 2024 · 4 comments
Open

After few minutes of running listener stops getting updates #137

purex121 opened this issue Apr 15, 2024 · 4 comments

Comments

@purex121
Copy link

After few minutes of running listener stops getting updates.

@FunkyYang
Copy link

yes,you can write a event func on the update channel by yourself

@FunkyYang
Copy link

the update channel is fulled

@qmarliu
Copy link

qmarliu commented Apr 25, 2024

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
  }
}

@qmarliu
Copy link

qmarliu commented Apr 25, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants