Skip to content

Commit

Permalink
hotfix(Send): 修复发送告警agent报错 #151 (#152)
Browse files Browse the repository at this point in the history
修复发送告警agent报错问题,修复后连接数大量减少
  • Loading branch information
Johnson1998 authored Jul 27, 2024
1 parent 4965fa4 commit b517173
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/util/interflow/hook/hook_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ func (l *hookHttpInterflow) Close() error {
}

func (l *hookHttpInterflow) Send(ctx context.Context, msg *interflow.HookMsg) (err error) {
_, err = httpx.NewHttpX().POSTWithContext(ctx, l.server.GetUrl(), msg.Bytes())
response, err := httpx.NewHttpX().POSTWithContext(ctx, l.server.GetUrl(), msg.Bytes())
if err != nil {
return err
}
defer response.Body.Close()
return err
}

Expand Down

0 comments on commit b517173

Please sign in to comment.