英文:
How to cancel Client.send in Tdlib?
问题
我正在通过Tdlib编写Telegram认证,发现该库在内部处理重试(例如,当我尝试发送电话号码以开始认证并且连接不稳定/丢失时,库会在内部安排暂停和重试)。
问题是我无法停止它,或者至少无法更改重试策略。如果请求被安排重试,我也不能再次发送相同的请求。
有任何解决这个问题的想法吗?
英文:
I'm writing Telegram authentication via Tdlib and have found that library handles retries internally (e.g. 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?
答案1
得分: -1
看起来答案是发送TdApi.ResendAuthenticationCode
。其他可用的重发操作包括:
TdApi.ResendChangePhoneNumberCode
TdApi.ResendEmailAddressVerificationCode
TdApi.ResendMessages
TdApi.ResendPhoneNumberConfirmationCode
TdApi.ResendPhoneNumberVerificationCode
TdApi.ResendRecoveryEmailAddressCode
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论