Corrected prunesocketset and pruneprocessset

fd sets passed to select() were pruning ready FDs rather than pruning
UN-ready FDs.
This commit is contained in:
Erik O'Leary 2014-01-19 10:51:21 -06:00
commit 5d8d1ed8bc
5 changed files with 6 additions and 6 deletions

View file

@ -119,7 +119,7 @@ proc next*(s: var TScgistate, timeout: int = -1): bool =
## request, if ``timeout`` is `-1` then this function will never time out.
## Returns `True` if a new request has been processed.
var rsocks = @[s.server]
if select(rsocks, timeout) == 1 and rsocks.len == 0:
if select(rsocks, timeout) == 1 and rsocks.len == 1:
new(s.client)
accept(s.server, s.client)
var L = 0