Skip to content

Commit

Permalink
fix: remove b=nil setting which does not do anything
Browse files Browse the repository at this point in the history
Signed-off-by: Sandor Szücs <[email protected]>
  • Loading branch information
szuecs committed Jan 5, 2024
1 parent 5216a25 commit f4366a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion filters/block/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func blockMatcher(m metrics.Metrics, matches []toBlockKeys) func(b []byte) (int,
for _, s := range matches {
s := s
if bytes.Contains(b, s.Str) {
b = nil
m.IncCounter("blocked.requests")
return 0, io.ErrBlocked
}
Expand Down
1 change: 0 additions & 1 deletion io/read_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func blockMatcher(matches []toBlockKeys) func(b []byte) (int, error) {
var consumed int
for _, s := range matches {
if bytes.Contains(b, s.Str) {
b = nil
return 0, ErrBlocked
}
}
Expand Down

0 comments on commit f4366a9

Please sign in to comment.