Additional fix for User key unregister in the KQueue backend
This commit is contained in:
parent
adc1419499
commit
0338516e70
1 changed files with 1 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ proc unregister*[T](s: Selector[T], fd: int|SocketHandle) =
|
||||||
|
|
||||||
if pkey.events != {}:
|
if pkey.events != {}:
|
||||||
if pkey.events * {Event.Read, Event.Write, Event.User} != {}:
|
if pkey.events * {Event.Read, Event.Write, Event.User} != {}:
|
||||||
if Event.Read in pkey.events:
|
if Event.Read in pkey.events or Event.User in pkey.events:
|
||||||
modifyKQueue(s, uint(fdi), EVFILT_READ, EV_DELETE, 0, 0, nil)
|
modifyKQueue(s, uint(fdi), EVFILT_READ, EV_DELETE, 0, 0, nil)
|
||||||
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