Skip to content

Commit

Permalink
namesys/pubsub: warning for receive errors
Browse files Browse the repository at this point in the history
and more informative error messages at that.

License: MIT
Signed-off-by: vyzo <vyzo@hackzen.org>
  • Loading branch information
vyzo committed Jul 11, 2017
1 parent adf9b40 commit 6cd7c2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions namesys/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (r *PubsubResolver) handleSubscription(sub *floodsub.Subscription, name str

err = r.receive(msg, name, pubk)
if err != nil {
log.Debugf("PubsubResolve: error proessing update for %s: %s", name, err.Error())
log.Warningf("PubsubResolve: error proessing update for %s: %s", name, err.Error())
}
}
}
Expand Down Expand Up @@ -286,7 +286,7 @@ func (r *PubsubResolver) receive(msg *floodsub.Message, name string, pubk ci.Pub

eol, ok := checkEOL(entry)
if ok && eol.Before(time.Now()) {
return errors.New("stale update")
return errors.New("stale update; EOL exceeded")
}

r.mx.Lock()
Expand All @@ -297,7 +297,7 @@ func (r *PubsubResolver) receive(msg *floodsub.Message, name string, pubk ci.Pub
if err == nil {
oentry := dsval.(*pb.IpnsEntry)
if entry.GetSequence() <= oentry.GetSequence() {
return errors.New("stale update")
return errors.New("stale update; sequence number too small")
}
}

Expand Down

0 comments on commit 6cd7c2c

Please sign in to comment.