From 50cbe2b6652f8042358a9d52bf6a14553698c8db Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 10 Jul 2019 03:19:22 -0700 Subject: [PATCH] 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). --- swarm_conn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm_conn.go b/swarm_conn.go index 26a7794..1fa5deb 100644 --- a/swarm_conn.go +++ b/swarm_conn.go @@ -121,7 +121,7 @@ func (c *Conn) start() { func (c *Conn) String() string { return fmt.Sprintf( - " %s (%s)>", + " %s (%s)>", c.conn.Transport(), c.conn.LocalMultiaddr(), c.conn.LocalPeer().Pretty(), -- GitLab