Fix negative pending requests bug

This commit is contained in:
Zed 2023-08-31 05:06:47 +02:00
parent 82beb5da8c
commit 84dcf49079

View file

@ -116,7 +116,6 @@ proc release*(account: GuestAccount) =
proc getGuestAccount*(api: Api): Future[GuestAccount] {.async.} = proc getGuestAccount*(api: Api): Future[GuestAccount] {.async.} =
for i in 0 ..< accountPool.len: for i in 0 ..< accountPool.len:
if result.isReady(api): break if result.isReady(api): break
release(result)
result = accountPool.sample() result = accountPool.sample()
if not result.isNil and result.isReady(api): if not result.isNil and result.isReady(api):