Skip to content

Commit

Permalink
Merge pull request #2886 from actiontech/fix_missing_return_rule_error
Browse files Browse the repository at this point in the history
fix: scannerd go test, add error nil judgment
  • Loading branch information
LordofAvernus authored Jan 21, 2025
2 parents fdba800 + e0752ed commit c596082
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sqle/cmd/scannerd/scanners/supervisor/supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ func Start(ctx context.Context, scanner scanners.Scanner, leastPushSecond, pushB
for {
select {
case err := <-runErrCh:
UploadErr := scanner.Upload(context.TODO(), batch, err.Error())
if UploadErr != nil {
return errors.Wrap(UploadErr, "failed to upload sql")
if err != nil {
UploadErr := scanner.Upload(context.TODO(), batch, err.Error())
if UploadErr != nil {
return errors.Wrap(UploadErr, "failed to upload sql")
}
}
return err

Expand Down

0 comments on commit c596082

Please sign in to comment.