Skip to content

Commit

Permalink
Keep probe interval consistent for the same outbound
Browse files Browse the repository at this point in the history
Sort outbounds before probing so the probing interval is consistent for
the same outbound.

Also fix the format of some error messages.
  • Loading branch information
digglife committed Aug 25, 2021
1 parent 9b83bb1 commit 433e342
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/observatory/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net"
"net/http"
"net/url"
"sort"
"sync"
"time"

Expand Down Expand Up @@ -67,6 +68,7 @@ func (o *Observer) background() {
}

outbounds := hs.Select(o.config.SubjectSelector)
sort.Strings(outbounds)

o.updateStatus(outbounds)

Expand Down

0 comments on commit 433e342

Please sign in to comment.