Skip to content

Commit

Permalink
epoll: handle err events after read/write events
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed Sep 14, 2023
1 parent 5ca5456 commit 1c01c70
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions poller_epoll.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ func (p *poller) readWriteLoop() {
default:
c := p.getConn(fd)
if c != nil {
if ev.Events&epollEventsError != 0 {
c.closeWithError(io.EOF)
continue
}

if ev.Events&epollEventsWrite != 0 {
c.flush()
}
Expand Down Expand Up @@ -227,6 +222,11 @@ func (p *poller) readWriteLoop() {
p.g.onRead(c)
}
}

if ev.Events&epollEventsError != 0 {
c.closeWithError(io.EOF)
continue
}
} else {
syscall.Close(fd)
// p.deleteEvent(fd)
Expand Down

0 comments on commit 1c01c70

Please sign in to comment.