Skip to content

Commit

Permalink
refactor ET
Browse files Browse the repository at this point in the history
  • Loading branch information
pilot committed Aug 16, 2023
1 parent 6357b14 commit e0ad047
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions epoll.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,9 @@ func (ep *epoll) del(ev *Event) error {
es.events &^= EvClosed
es.epEvents &^= syscall.EPOLLRDHUP
}
if ev.events&EvET != 0 {
es.epEvents &^= syscall.EPOLLET & 0xFFFFFFFF
}

op := syscall.EPOLL_CTL_DEL
if es.epEvents == 0 {
if es.events == 0 {
delete(ep.fdEvs, ev.fd)
} else {
op = syscall.EPOLL_CTL_MOD
Expand Down

0 comments on commit e0ad047

Please sign in to comment.