mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-02 12:53:09 +00:00
fix bug in WithEventTracer
wrong nil check.
This commit is contained in:
parent
39e65e8729
commit
06d72b93da
@ -361,7 +361,7 @@ func WithDiscovery(d discovery.Discovery, opts ...DiscoverOpt) Option {
|
||||
// WithEventTracer provides a tracer for the pubsub system
|
||||
func WithEventTracer(tracer EventTracer) Option {
|
||||
return func(p *PubSub) error {
|
||||
if tracer != nil {
|
||||
if p.tracer != nil {
|
||||
p.tracer.tracer = tracer
|
||||
} else {
|
||||
p.tracer = &pubsubTracer{tracer: tracer, pid: p.host.ID(), msgID: p.msgID}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user