From fb137112be61bd3aa1129b887a7ce65bba28494c Mon Sep 17 00:00:00 2001 From: cheatfate Date: Fri, 22 Jan 2021 15:02:13 +0200 Subject: [PATCH] Remove debugging changes. --- chronos/asyncsync.nim | 2 +- chronos/transports/stream.nim | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chronos/asyncsync.nim b/chronos/asyncsync.nim index 0be29ea0..b352a895 100644 --- a/chronos/asyncsync.nim +++ b/chronos/asyncsync.nim @@ -37,7 +37,7 @@ type ## state to be signaled, when event get fired, then all coroutines ## continue proceeds in order, they have entered waiting state. flag: bool - waiters*: seq[Future[void]] + waiters: seq[Future[void]] AsyncQueue*[T] = ref object of RootRef ## A queue, useful for coordinating producer and consumer coroutines. diff --git a/chronos/transports/stream.nim b/chronos/transports/stream.nim index c14746dc..aae041d7 100644 --- a/chronos/transports/stream.nim +++ b/chronos/transports/stream.nim @@ -1639,7 +1639,9 @@ proc close*(server: StreamServer) = ## Please note that release of resources is not completed immediately, to be ## sure all resources got released please use ``await server.join()``. proc continuation(udata: pointer) {.gcsafe.} = - server.clean() + # Stop tracking server + if not(server.loopFuture.finished()): + server.clean() let r1 = (server.status == ServerStatus.Stopped) and not(isNil(server.function))