Skip to content

Commit

Permalink
fix #11 dont' close the connection in case of syscall.EV_EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoyuepan committed Jul 5, 2024
1 parent 82e19a0 commit 5857d74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions epoll_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ retry:
for i := 0; i < n; i++ {
conn := e.conns[int(events[i].Ident)]
if conn != nil {
if (events[i].Flags & syscall.EV_EOF) == syscall.EV_EOF {
conn.Close()
}
// issue #11: don't close the connection here because maybe data need to drain
//
// if (events[i].Flags & syscall.EV_EOF) == syscall.EV_EOF {
// conn.Close()
// }
conns = append(conns, conn)
}
}
Expand Down

0 comments on commit 5857d74

Please sign in to comment.