diff --git a/api/hook/index.go b/api/hook/index.go index 2d1690b..3ae04b6 100644 --- a/api/hook/index.go +++ b/api/hook/index.go @@ -18,6 +18,7 @@ func Handler(w http.ResponseWriter, r *http.Request) { res := make(map[string]string) err = bot.ResolveHook() + if err != nil { res["status"] = "ERROR" res["code"] = "internal_error" diff --git a/utils/bot/bot.go b/utils/bot/bot.go index 8a9eda9..422d5eb 100644 --- a/utils/bot/bot.go +++ b/utils/bot/bot.go @@ -82,6 +82,7 @@ func (b Bot) resolveCommand() error { defer func() { b.rCh <- rChannel{err: err} + close(b.rCh) }() data := b.getTelegramData()