Skip to content

Commit 154cb3a

Browse files
author
v.khaverko
committed
not shutdown netreap after getting incorrect event from nomad
1 parent dbf1bd1 commit 154cb3a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

reapers/endpoints.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package reapers
22

33
import (
44
"context"
5+
"encoding/json"
56
"fmt"
67
"math"
78
"sort"
@@ -90,6 +91,10 @@ func (e *EndpointReaper) Run(ctx context.Context) (<-chan bool, error) {
9091

9192
case events := <-eventChan:
9293
if events.Err != nil {
94+
if _, ok := err.(*json.SyntaxError); ok {
95+
zap.L().Debug("Got incorrect event from nomad", zap.Error(events.Err))
96+
continue
97+
}
9398
zap.L().Debug("Got error message from node event channel", zap.Error(events.Err))
9499
failChan <- true
95100
return

0 commit comments

Comments
 (0)