Skip to content

Commit

Permalink
handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
safchain committed Oct 16, 2024
1 parent 419e17e commit 43f60a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/security/module/cws.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,13 @@ func (c *CWSConsumer) Start() error {
seclog.Debugf("self-test results : success : %v, failed : %v, retry %d/%d", success, fails, c.selfTestRetry.Load()+1, maxSelftestRetry)

if len(fails) > 0 && c.selfTestRetry.Load() < maxSelftestRetry {
c.RunSelfTest(false)
c.selfTestRetry.Inc()

time.Sleep(selftestDelay)

if _, err := c.RunSelfTest(false); err != nil {
seclog.Errorf("self-test error: %s", err)
}
return
}

Expand Down

0 comments on commit 43f60a3

Please sign in to comment.