Skip to content

Commit

Permalink
fix: don't assume that transports implement stringer (#134)
Browse files Browse the repository at this point in the history
If they don't, this could end up reading a bunch of internal data, causing a
race (and yes, this has happened).
Stebalien authored and raulk committed Jul 10, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 42ff51f commit c0a856c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_conn.go
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ func (c *Conn) start() {

func (c *Conn) String() string {
return fmt.Sprintf(
"<swarm.Conn[%s] %s (%s) <-> %s (%s)>",
"<swarm.Conn[%T] %s (%s) <-> %s (%s)>",
c.conn.Transport(),
c.conn.LocalMultiaddr(),
c.conn.LocalPeer().Pretty(),

0 comments on commit c0a856c

Please sign in to comment.