From 3461a7b20704464ee3c19a3dd31805e4c5c1fc4f Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 12 Oct 2017 08:00:53 -0700 Subject: 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 --- app/notification.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/notification.go') diff --git a/app/notification.go b/app/notification.go index 3df4a789f..2a8f9ff2e 100644 --- a/app/notification.go +++ b/app/notification.go @@ -7,7 +7,6 @@ import ( "fmt" "html" "html/template" - "io/ioutil" "net/http" "net/url" "path/filepath" @@ -701,8 +700,7 @@ func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session } else { pushResponse := model.PushResponseFromJson(resp.Body) if resp.Body != nil { - ioutil.ReadAll(resp.Body) - resp.Body.Close() + consumeAndClose(resp) } if pushResponse[model.PUSH_STATUS] == model.PUSH_STATUS_REMOVE { -- cgit v1.2.3-1-g7c22