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

net.Conn set 【SO_RCVBUF】, can‘t Close the Conn #67094

Closed
wangyuanwenGit opened this issue Apr 28, 2024 · 1 comment
Closed

net.Conn set 【SO_RCVBUF】, can‘t Close the Conn #67094

wangyuanwenGit opened this issue Apr 28, 2024 · 1 comment

Comments

@wangyuanwenGit
Copy link

goversion:go version go1.19.13 windows/amd64
hostarch:linux

go fd, err1 := outConn.(*net.TCPConn).File() if err1 == nil { syscall.SetsockoptInt(int(fd.Fd()), syscall.SOL_SOCKET, syscall.SO_RCVBUF, 1024*128) }

Then, call the outConn.Close() returned nil error, but I used netstat to check the connection, and it was still in the ESTABLISH state. When I deleted the code that set the SO_RCVBUF size, everything returned to normal. I'm not sure what the problem is. Is there something wrong with my usage?

Of course, t can see the receive buffer has many bytes to read.

BA55BD91-CE9C-45cb-BBF9-697C53048598

please help me,thank you!!

@seankhliao
Copy link
Member

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants