Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Oct 2, 2023
1 parent effdc5b commit fe23c01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ func (c *Controller) trySubscribe(topic *pubsub.Topic) (sub *pubsub.Subscription
func (c *Controller) validateMsg(ctx context.Context, p peer.ID, msg *pubsub.Message) pubsub.ValidationResult {
res, err := c.valRouter.HandleWait(ctx, p, msg)
if err != nil {
c.lggr.Warnw("failed to handle msg", "err", err)
if ctx.Err() == nil {
c.lggr.Warnw("failed to handle msg", "err", err)
}
return pubsub.ValidationIgnore
}
return res
Expand Down
1 change: 0 additions & 1 deletion core/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (r *msgRouter[T]) Start(pctx context.Context) {
}
r.dispatchMsg(msg)
case <-ctx.Done():
close(r.q)
return
}
}
Expand Down

0 comments on commit fe23c01

Please sign in to comment.