Commit 04c86bbd authored by Steven Allen's avatar Steven Allen Committed by Raúl Kripalani

fix: don't assume that transports implement stringer (#134)

If they don't, this could end up reading a bunch of internal data, causing a
race (and yes, this has happened).
parent 4a42085d
...@@ -122,7 +122,7 @@ func (c *Conn) start() { ...@@ -122,7 +122,7 @@ func (c *Conn) start() {
func (c *Conn) String() string { func (c *Conn) String() string {
return fmt.Sprintf( return fmt.Sprintf(
"<swarm.Conn[%s] %s (%s) <-> %s (%s)>", "<swarm.Conn[%T] %s (%s) <-> %s (%s)>",
c.conn.Transport(), c.conn.Transport(),
c.conn.LocalMultiaddr(), c.conn.LocalMultiaddr(),
c.conn.LocalPeer().Pretty(), c.conn.LocalPeer().Pretty(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment