Fix io slector unregister for windows as well.

This commit is contained in:
Ray Imber 2019-10-10 16:49:56 -07:00
commit aa84d35d86

View file

@ -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: