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

err.Error() never contains "closed" #231

Open
ganlvtech opened this issue Jan 12, 2023 · 1 comment
Open

err.Error() never contains "closed" #231

ganlvtech opened this issue Jan 12, 2023 · 1 comment

Comments

@ganlvtech
Copy link

netpoll/netpoll_server.go

Lines 93 to 101 in 6a5a4f7

// accept socket
conn, err := s.ln.Accept()
if err != nil {
// shut down
if strings.Contains(err.Error(), "closed") {
s.operator.Control(PollDetach)
s.onQuit(err)
return err
}

syscall.Accept returns Errno

And error descriptions are defined in zerros_*_*.go

https://github.com/golang/go/blob/245e95dfabd77f337373bf2d6bb47cd353ad8d74/src/syscall/zerrors_linux_amd64.go#L1358-L1490

cd /usr/local/go/src/syscall
grep closed zerrors_*

output no lines.

@joway joway added fix fix or hotfix some bugs bug Something isn't working and removed fix fix or hotfix some bugs labels Jan 13, 2023
@joway
Copy link
Member

joway commented Jan 13, 2023

notive and will Investigate it, thanks

@joway joway added code analysis and removed bug Something isn't working labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants