mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add back consumeAndClose functionality. (#7608)
* consume bodies for action button integrations, webrtc gateway, oauth endpoint * Fixing a couple more places, switching to io.Copy to ioutil.Discard, adding a comment to help prevent future performance regressions
This commit is contained in:
committed by
GitHub
parent
521e27f4ac
commit
3461a7b207
@@ -109,7 +109,7 @@ func (a *App) TriggerWebhook(payload *model.OutgoingWebhookPayload, hook *model.
|
||||
if resp, err := utils.HttpClient(false).Do(req); err != nil {
|
||||
l4g.Error(utils.T("api.post.handle_webhook_events_and_forget.event_post.error"), err.Error())
|
||||
} else {
|
||||
defer resp.Body.Close()
|
||||
defer consumeAndClose(resp)
|
||||
webhookResp := model.OutgoingWebhookResponseFromJson(resp.Body)
|
||||
|
||||
if webhookResp != nil && webhookResp.Text != nil {
|
||||
|
||||
Reference in New Issue
Block a user