mirror of
https://github.com/vacp2p/nim-libp2p-experimental.git
synced 2025-01-13 20:04:43 +00:00
remove on transport close cleanup
This commit is contained in:
parent
8963c2d0ed
commit
8e9716f5c3
@ -16,12 +16,6 @@ logScope:
|
|||||||
type ChronosStream* = ref object of LPStream
|
type ChronosStream* = ref object of LPStream
|
||||||
client: StreamTransport
|
client: StreamTransport
|
||||||
|
|
||||||
proc onTransportClose(s: ChronosStream,
|
|
||||||
client: StreamTransport) {.async.} =
|
|
||||||
await client.join()
|
|
||||||
trace "Transport closed, closing connection"
|
|
||||||
await s.close()
|
|
||||||
|
|
||||||
proc newChronosStream*(client: StreamTransport): ChronosStream =
|
proc newChronosStream*(client: StreamTransport): ChronosStream =
|
||||||
new result
|
new result
|
||||||
result.client = client
|
result.client = client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user