diff --git a/codex/discovery.nim b/codex/discovery.nim index 88167a29..1734e4bf 100644 --- a/codex/discovery.nim +++ b/codex/discovery.nim @@ -216,6 +216,7 @@ proc stop*(d: Discovery) {.async: (raises: []).} = try: await noCancel d.protocol.closeWait() + d.isStarted = false except CatchableError as exc: error "Error stopping discovery", exc = exc.msg