Fix io slector unregister for windows as well.

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

View File

@@ -286,7 +286,7 @@ proc unregister*[T](s: Selector[T], fd: SocketHandle|int) =
s.withSelectLock():
let fd = fd.SocketHandle
var pkey = s.getKey(fd)
if Event.Read in pkey.events:
if pkey.events * {Event.Read, Event.User} != {}:
IOFD_CLR(fd, addr s.rSet)
dec(s.count)
if Event.Write in pkey.events: