diff --git a/td.go b/td.go index e98b8d9..bafbc3e 100644 --- a/td.go +++ b/td.go @@ -170,6 +170,8 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { fmt.Printf("Overflow : %d messages retrieved out of %d dating back %s (%d) ...\n", msgCount, msgParsed, lastParsedTime.Format(time.RFC3339), lastParsedID64) time.Sleep(5 * time.Second) } + } else { + loopOverflow = 0 } } log.Printf("Exported %d messages.\n", msgCount)