Skip to content

Commit 96fbc5d

Browse files
authored
Fix duplicate error equality check (#314)
1 parent 9f87a47 commit 96fbc5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/node-termination-handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func main() {
172172
if err != nil {
173173
log.Log().Str("event_type", monitor.Kind()).Err(err).Msg("There was a problem monitoring for events")
174174
metrics.ErrorEventsInc(monitor.Kind())
175-
if err == previousErr {
175+
if previousErr != nil && err.Error() == previousErr.Error() {
176176
duplicateErrCount++
177177
} else {
178178
duplicateErrCount = 0

0 commit comments

Comments
 (0)