add timer for timeout
This commit is contained in:
parent
4d510021e5
commit
bac80e723f
1
td.go
1
td.go
@ -89,6 +89,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
if err.Error() == "timeout" {
|
||||
logOnError(err, "Waiting...")
|
||||
fmt.Printf("Waiting : %d messages retrieved out of %d dating back %s ...\n", msgCount, msgParsed, lastParsedTime.Format(time.RFC3339))
|
||||
time.Sleep(5 * time.Second)
|
||||
} else {
|
||||
logOnError(err, "Cannot get history")
|
||||
lastParsedID64 = -1
|
||||
|
Loading…
Reference in New Issue
Block a user