mirror of https://github.com/vacp2p/nim-libp2p.git
disable storing connections on internal table
This commit is contained in:
parent
87b35de83e
commit
5a657c9264
|
@ -30,12 +30,13 @@ proc connHandler*(t: Transport,
|
||||||
let conn: Connection = newConnection(newChronosStream(server, client))
|
let conn: Connection = newConnection(newChronosStream(server, client))
|
||||||
conn.observedAddrs = MultiAddress.init(client.remoteAddress)
|
conn.observedAddrs = MultiAddress.init(client.remoteAddress)
|
||||||
if not initiator:
|
if not initiator:
|
||||||
let handlerFut = if isNil(t.handler): nil else: t.handler(conn)
|
if not isNil(t.handler):
|
||||||
let connHolder: ConnHolder = ConnHolder(connection: conn,
|
asyncCheck t.handler(conn)
|
||||||
connFuture: handlerFut)
|
|
||||||
# TODO: this needs rethinking,
|
# TODO: this needs rethinking,
|
||||||
# currently it leaks since there
|
# currently it leaks since there
|
||||||
# is no way to delete the conn on close
|
# is no way to delete the conn on close
|
||||||
|
# let connHolder: ConnHolder = ConnHolder(connection: conn,
|
||||||
|
# connFuture: handlerFut)
|
||||||
# t.connections.add(connHolder)
|
# t.connections.add(connHolder)
|
||||||
result = conn
|
result = conn
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue