Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Apr 21, 2024
1 parent 608c6a4 commit a9c132d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reactor_kqueue_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (

"golang.org/x/sys/unix"

"github.com/panjf2000/gnet/v2/internal/netpoll"
"github.com/panjf2000/gnet/v2/pkg/errors"
)

Expand Down Expand Up @@ -52,7 +53,7 @@ func (el *eventloop) orbit() error {
defer runtime.UnlockOSThread()
}

err := el.poller.Polling(func(fd int, filter int16, flags uint16) (err error) {
err := el.poller.Polling(func(fd int, filter netpoll.IOEvent, flags netpoll.IOFlags) (err error) {
c := el.connections.getConn(fd)
if c == nil {
// This might happen when the connection has already been closed,
Expand Down Expand Up @@ -110,7 +111,7 @@ func (el *eventloop) run() error {
defer runtime.UnlockOSThread()
}

err := el.poller.Polling(func(fd int, filter int16, flags uint16) (err error) {
err := el.poller.Polling(func(fd int, filter netpoll.IOEvent, flags netpoll.IOFlags) (err error) {
c := el.connections.getConn(fd)
if c == nil {
if _, ok := el.listeners[fd]; ok {
Expand Down

0 comments on commit a9c132d

Please sign in to comment.