Skip to content

Commit

Permalink
httptransport: handle no notifier in "combo" mode
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <[email protected]>
Backports: quay#1531
(cherry picked from commit ce462ea)
Signed-off-by: test
  • Loading branch information
hdonnay committed Apr 4, 2022
1 parent cc5a916 commit d314e41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions httptransport/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ func (t *Server) configureComboMode(ctx context.Context) error {
return clairerror.ErrNotInitialized{Msg: "could not configure matcher: " + err.Error()}
}

err = t.configureNotifierMode(ctx)
if err != nil {
return clairerror.ErrNotInitialized{Msg: "could not configure notifier: " + err.Error()}
if t.notifier != nil {
if err := t.configureNotifierMode(ctx); err != nil {
return clairerror.ErrNotInitialized{Msg: "could not configure notifier: " + err.Error()}
}
}

return nil
Expand Down

0 comments on commit d314e41

Please sign in to comment.