From d06eead68daccd87bfdd6a10d289fd47cdeec987 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Sun, 9 Aug 2015 21:12:15 -0500 Subject: [PATCH] don't panic for failed updates, even in debug (fixes #14) --- updates.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/updates.go b/updates.go index a3c6c46..f790a88 100644 --- a/updates.go +++ b/updates.go @@ -13,13 +13,9 @@ func (bot *BotAPI) UpdatesChan(config UpdateConfig) error { for { updates, err := bot.GetUpdates(config) if err != nil { - if bot.Debug { - panic(err) - } else { - log.Println(err) - log.Println("Failed to get updates, retrying in 3 seconds...") - time.Sleep(time.Second * 3) - } + log.Println(err) + log.Println("Failed to get updates, retrying in 3 seconds...") + time.Sleep(time.Second * 3) continue }