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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
521e27f4ac
Коммит
3461a7b207
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user