Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Feb 5, 2024
1 parent c9bdc66 commit 2ac25bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions connection_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ func (c *conn) handleEvents(_ int, filter int16, flags uint16) (err error) {
}
case filter == netpoll.EVFilterRead:
err = c.loop.read(c)
case filter == netpoll.EVFilterWrite:
if !c.outboundBuffer.IsEmpty() {
err = c.loop.write(c)
}
case filter == netpoll.EVFilterWrite && !c.outboundBuffer.IsEmpty():
err = c.loop.write(c)
}
return
}
Expand Down

0 comments on commit 2ac25bc

Please sign in to comment.