From ab8d5487da0c84a0923a44203aa0a4b3b8ca51fb Mon Sep 17 00:00:00 2001 From: bcmk <45658475+bcmk@users.noreply.github.com> Date: Mon, 10 Dec 2018 18:02:58 +0400 Subject: [PATCH] Closing update body --- bot.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bot.go b/bot.go index d56aaf8..85e16c1 100644 --- a/bot.go +++ b/bot.go @@ -526,6 +526,7 @@ func (bot *BotAPI) ListenForWebhook(pattern string) UpdatesChannel { http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) { bytes, _ := ioutil.ReadAll(r.Body) + r.Body.Close() var update Update json.Unmarshal(bytes, &update)