Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
only add to the wg if the validator is NOT closed
Browse files Browse the repository at this point in the history
  • Loading branch information
robbyt committed Sep 19, 2024
1 parent e54e322 commit 03d5ff5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proxy/addons/requestAndResponseValidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ func (c *RequestAndResponseValidator) Request(f *px.Flow) {
// Response validates the response, and does not use the normal logger, because
// the response may not have all the necessary fields needed to log.
func (c *RequestAndResponseValidator) Response(f *px.Flow) {
c.wg.Add(1)
defer c.wg.Done()
if !c.closed.Load() {
// if the addon is NOT closed, then add to the wait group
c.wg.Add(1)
defer c.wg.Done()
}

if f.Response != nil {
return
Expand Down

0 comments on commit 03d5ff5

Please sign in to comment.