Skip to content

Commit

Permalink
svs: fix example print
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Feb 2, 2025
1 parent ff129e1 commit 965fce2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions std/examples/svs-alo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ func main() {
// If we get more than three errors from a publisher, we will stop
// subscribing to that publisher.
svsalo.SetOnError(func(err error) {
fmt.Fprintf(os.Stderr, "*** %v\n", err)
errSync := &ndn_sync.ErrSync{}
if errors.As(err, &errSync) {
hash := errSync.Name().Hash()
Expand All @@ -151,7 +150,7 @@ func main() {
}

subs[hash]++
if subs[hash] > 3 {
if subs[hash] >= 3 {
fmt.Fprintf(os.Stderr, "*** Unsubscribing from %s (too many errors)\n", errSync.Name())
svsalo.UnsubscribePublisher(errSync.Name())
delete(subs, hash)
Expand Down

0 comments on commit 965fce2

Please sign in to comment.