Fix ListenForWebhook closing chan after request.
parent
3f07c5f676
commit
fde58e56ae
3
bot.go
3
bot.go
|
@ -484,13 +484,12 @@ func (bot *BotAPI) ListenForWebhook(pattern string) UpdatesChannel {
|
|||
}
|
||||
|
||||
ch <- *update
|
||||
close(ch)
|
||||
})
|
||||
|
||||
return ch
|
||||
}
|
||||
|
||||
// ListenForWebhookRespReqFormat registers a http handler for a webhook.
|
||||
// ListenForWebhookRespReqFormat registers a http handler for a single incoming webhook.
|
||||
func (bot *BotAPI) ListenForWebhookRespReqFormat(w http.ResponseWriter, r *http.Request) UpdatesChannel {
|
||||
ch := make(chan Update, bot.Buffer)
|
||||
|
||||
|
|
Loading…
Reference in New Issue