Fix io slector unregister for windows as well.
This commit is contained in:
parent
b347490f91
commit
aa84d35d86
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ proc unregister*[T](s: Selector[T], fd: SocketHandle|int) =
|
||||||
s.withSelectLock():
|
s.withSelectLock():
|
||||||
let fd = fd.SocketHandle
|
let fd = fd.SocketHandle
|
||||||
var pkey = s.getKey(fd)
|
var pkey = s.getKey(fd)
|
||||||
if Event.Read in pkey.events:
|
if pkey.events * {Event.Read, Event.User} != {}:
|
||||||
IOFD_CLR(fd, addr s.rSet)
|
IOFD_CLR(fd, addr s.rSet)
|
||||||
dec(s.count)
|
dec(s.count)
|
||||||
if Event.Write in pkey.events:
|
if Event.Write in pkey.events:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue