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…
Reference in New Issue