Skip to content

Commit

Permalink
fix: close resp body
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored May 22, 2024
1 parent bd26a39 commit 64eadc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/hooks/wechat_push/wechat_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (w *WeChatPushHook) getWxAccessToken() string {
if err != nil {
return ""
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var ret accessTokenRes
_ = json.Unmarshal(body, &ret)
Expand Down

0 comments on commit 64eadc6

Please sign in to comment.