Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

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).
  • Loading branch information
Stebalien authored and raulk committed Jul 10, 2019
1 parent 4a42085 commit 04c86bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swarm_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 04c86bb

Please sign in to comment.