Skip to content

Commit f124daf

Browse files
authored
Observatory: Fix consuming 100% CPU when no outbound matches subjectSelector (#6669)
Fixes #6666
1 parent 598bde7 commit f124daf

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/observatory/observer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ func (o *Observer) background() {
7878
sleepTime = time.Duration(o.config.ProbeInterval)
7979
}
8080

81+
if len(outbounds) == 0 {
82+
errors.LogWarning(o.ctx, "no outbound matches subjectSelector ", o.config.SubjectSelector)
83+
time.Sleep(sleepTime)
84+
continue
85+
}
86+
8187
if !o.config.EnableConcurrency {
8288
sort.Strings(outbounds)
8389
for _, v := range outbounds {

0 commit comments

Comments
 (0)