setup query end

This commit is contained in:
Jaremy Creechley 2023-09-26 14:09:38 -07:00
parent 2600d244f1
commit 33ca4346e4
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300

View File

@ -288,14 +288,14 @@ method query*(
dispatchTask[void](self, signal):
discard ctx.signal.fireSync()
# if ctx.res.isErr() and ctx.res.error()[0] == ErrorEnum.QueryEndedErr:
# iter.finished = true
# return
# elif ctx.res.isErr():
# return err(ctx.res.error())
# else:
# let qres = ctx.res.get()
# return ok(default)
if ctx.res.isErr() and ctx.res.error()[0] == ErrorEnum.QueryEndedErr:
iter.finished = true
return
elif ctx.res.isErr():
return err(ctx.res.error())
else:
let qres = ctx.res.get()
return ok(default)
iter.next = next
return success iter