One more attempt to fix tioselectors.nim test (#6020)
This commit is contained in:
parent
0345238d6e
commit
907c488a61
1 changed files with 8 additions and 4 deletions
|
|
@ -508,10 +508,14 @@ else:
|
||||||
freeAddrInfo(aiList)
|
freeAddrInfo(aiList)
|
||||||
# for some reason Windows select doesn't return both
|
# for some reason Windows select doesn't return both
|
||||||
# descriptors from first call, so we need to make 2 calls
|
# descriptors from first call, so we need to make 2 calls
|
||||||
var rcm1 = selector.select(1000)
|
var n = 0
|
||||||
var rcm2 = selector.select(1000)
|
var rcm = selector.select(1000)
|
||||||
let rcm = len(rcm1) + len(rcm2)
|
while n < 10 and len(rcm) < 2:
|
||||||
assert(rcm >= 2 and rcm <= 4)
|
sleep(1000)
|
||||||
|
rcm = selector.select(1000)
|
||||||
|
inc(n)
|
||||||
|
|
||||||
|
assert(len(rcm) == 2)
|
||||||
|
|
||||||
var sockAddress = SockAddr()
|
var sockAddress = SockAddr()
|
||||||
var addrLen = sizeof(sockAddress).Socklen
|
var addrLen = sizeof(sockAddress).Socklen
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue