Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: better epoll detection, allow to disable epoll #984

Merged
Prev Previous commit
Next Next commit
chore: close in defer
  • Loading branch information
StarpTech committed Nov 17, 2024
commit b0b58143f8648ddb09c7a8b47a17540e5b293ac1
3 changes: 2 additions & 1 deletion v2/pkg/netpoll/netpoll.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ func Supported() error {
return err
}

defer conn.Close()

if err := addConnErrGroup.Wait(); err != nil {
return err
}
Expand All @@ -107,7 +109,6 @@ func Supported() error {
if err != nil {
return err
}
_ = conn.Close()

return nil
})
Expand Down
Loading