Skip to content

Commit

Permalink
fix: maturity level & respHeaders == nil branch & comment link
Browse files Browse the repository at this point in the history
  • Loading branch information
WeixinX committed Oct 21, 2024
1 parent c6de6d5 commit 555d08d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion maintainer/feature_maturity_level.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ plugins:
experimental_since: 0.4.0
- name: sentinel
status: experimental
experimental_since: 0.4.0
experimental_since: 0.5.0
- name: tls_inspector
status: experimental
experimental_since: 0.4.0
Expand Down
7 changes: 1 addition & 6 deletions plugins/plugins/sentinel/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,9 @@ func (f *filter) OnLog(reqHeaders api.RequestHeaderMap, reqTrailers api.RequestT
// the statistics of metrics of Flow and HotSpot rules are completed in request phase (DecodeHeaders).
// However, considering the boundary problems such as memory leakage caused by client interrupting the request,
// we do Exit in OnLog after response phase.
// See site/content/en/docs/developer-guide/get_involved.md#filter.
// See https://github.com/mosn/htnn/blob/main/site/content/en/docs/developer-guide/get_involved.md#filter
defer e.Exit()

if respHeaders == nil {
api.LogError("response headers is nil")
return
}

gotSC, ok := respHeaders.Status()
if !ok {
api.LogWarn("failed to get response status code")
Expand Down

0 comments on commit 555d08d

Please sign in to comment.