diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-10-12 08:00:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-12 08:00:53 -0700 |
commit | 3461a7b20704464ee3c19a3dd31805e4c5c1fc4f (patch) | |
tree | b14ad4935a9453157024e638b5c468a1833e0eae /app/notification.go | |
parent | 521e27f4ace125b47879b38edbad07d7c21a54e6 (diff) | |
download | chat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.tar.gz chat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.tar.bz2 chat-3461a7b20704464ee3c19a3dd31805e4c5c1fc4f.zip |
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
Diffstat (limited to 'app/notification.go')
-rw-r--r-- | app/notification.go | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |