diff --git a/swarm_conn.go b/swarm_conn.go index 5099edde..77b2defb 100644 --- a/swarm_conn.go +++ b/swarm_conn.go @@ -199,6 +199,7 @@ func (c *Conn) NewStream(ctx context.Context) (network.Stream, error) { } ts, err := c.conn.OpenStream(ctx) if err != nil { + scope.Done() return nil, err } return c.addStream(ts, network.DirOutbound, scope)