-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
err := p.Validate() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if p == s.local { | ||
log.Event(ctx, "swarmDialSelf", logdial) | ||
// log.Event(ctx, "swarmDialSelf", logdial) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Stebalien, how are we supposed to deal with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Debugw
with a message.
return nil, ErrDialToSelf | ||
} | ||
|
||
defer log.EventBegin(ctx, "swarmDialAttemptSync", p).Done() | ||
// defer log.EventBegin(ctx, "swarmDialAttemptSync", p).Done() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just delete these lines.
@@ -111,7 +111,7 @@ func (s *Swarm) AddListenAddr(a ma.Multiaddr) error { | |||
// ignore. | |||
return | |||
default: | |||
log.Warningf("add conn %s failed: ", err) | |||
log.Warnf("add conn %s failed: ", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're changing these, we might as well switch to a structured version:
log.Warnw("adding connection failed", "to", p, "error", err)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #255.
Context: protocol/.github#41