简体   繁体   中英

How to cancel Client.send in Tdlib?

I'm writing Telegram authentication via Tdlib and have found that library handles retries internally (eg when I'm trying to send phone number to start authentication and connection is poor/missing library would schedule pause-n-retry internally).

The problem is that I can't stop it or at least change retry policy. Neither I was able to send the same request again if it was scheduled for retry.

Any ideas how to get over this?

So apparently the answer is to send TdApi.ResendAuthenticationCode . Other available resend actions are:

  • TdApi.ResendChangePhoneNumberCode
  • TdApi.ResendEmailAddressVerificationCode
  • TdApi.ResendMessages
  • TdApi.ResendPhoneNumberConfirmationCode
  • TdApi.ResendPhoneNumberVerificationCode
  • TdApi.ResendRecoveryEmailAddressCode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM