From abfd12f7a60ea9dc1e9328373db1d77e72bff720 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 26 Sep 2023 15:56:09 -0700 Subject: [PATCH] setup query --- datastore/threads/threadproxyds.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datastore/threads/threadproxyds.nim b/datastore/threads/threadproxyds.nim index 93782c0..77c4f1f 100644 --- a/datastore/threads/threadproxyds.nim +++ b/datastore/threads/threadproxyds.nim @@ -299,10 +299,10 @@ method query*( # trigger query task to iterate then wait for new result! discard ctx[].signal.fireSync() - if ctx[].res.isErr() and ctx[].res.error()[0] == ErrorEnum.QueryEndedErr: + if not ctx[].running: iter.finished = true - return success (key: Key.none, data: EmptyBytes) - elif ctx[].res.isErr(): + + if ctx[].res.isErr(): return err(ctx[].res.error()) else: let qres = ctx[].res.get()