setup query

This commit is contained in:
Jaremy Creechley 2023-09-26 15:56:09 -07:00
parent 5796d4dfa1
commit abfd12f7a6
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -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()