Merge pull request #211 from bcmk/close-body
Addressing too many open files error
This commit is contained in:
commit
9c399358c9
1 changed files with 1 additions and 0 deletions
1
bot.go
1
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue