From 6e0eb93d4f5b214746775d1cc61ac5a63545a564 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sat, 23 May 2020 13:26:10 -0600 Subject: [PATCH] remove readloops --- libp2p/connection.nim | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libp2p/connection.nim b/libp2p/connection.nim index 80e95a518..c8e625f6b 100644 --- a/libp2p/connection.nim +++ b/libp2p/connection.nim @@ -30,9 +30,6 @@ type peerInfo*: PeerInfo stream*: LPStream observedAddrs*: Multiaddress - # notice this is a ugly circular reference collection - # (we got many actually :-)) - readLoops*: seq[Future[void]] ConnectionTracker* = ref object of TrackerBase opened*: uint64 @@ -144,12 +141,6 @@ method close*(s: Connection) {.async, gcsafe.} = # s.stream = nil s.closeEvent.fire() - trace "waiting readloops", count=s.readLoops.len, - conn = $s, - oid = s.oid - await all(s.readLoops) - s.readLoops = @[] - trace "connection closed", closed = s.closed, conn = $s, oid = s.oid