mirror of https://github.com/vacp2p/nim-libp2p.git
remove readloops
This commit is contained in:
parent
abc12d0fb5
commit
6e0eb93d4f
|
@ -30,9 +30,6 @@ type
|
||||||
peerInfo*: PeerInfo
|
peerInfo*: PeerInfo
|
||||||
stream*: LPStream
|
stream*: LPStream
|
||||||
observedAddrs*: Multiaddress
|
observedAddrs*: Multiaddress
|
||||||
# notice this is a ugly circular reference collection
|
|
||||||
# (we got many actually :-))
|
|
||||||
readLoops*: seq[Future[void]]
|
|
||||||
|
|
||||||
ConnectionTracker* = ref object of TrackerBase
|
ConnectionTracker* = ref object of TrackerBase
|
||||||
opened*: uint64
|
opened*: uint64
|
||||||
|
@ -144,12 +141,6 @@ method close*(s: Connection) {.async, gcsafe.} =
|
||||||
# s.stream = nil
|
# s.stream = nil
|
||||||
|
|
||||||
s.closeEvent.fire()
|
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,
|
trace "connection closed", closed = s.closed,
|
||||||
conn = $s,
|
conn = $s,
|
||||||
oid = s.oid
|
oid = s.oid
|
||||||
|
|
Loading…
Reference in New Issue