-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/net/nettest: Conn.SetDeadline doc comment and test comment conflict #30275
Comments
Can you please confirm that the docs you are suggesting are really for the net.Conn interface instead of net.PacketConn interface. |
what I am suggesting is to correct doc of |
the doc of
|
Then, feel free to send a CL; the target package is https://godoc.org/github.com/golang/net/nettest. |
will send CL |
Change https://golang.org/cl/162923 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
this is related to documentation
net.Conn.setDeadline
says:This means I can extend previously set deadline to longer period.
but when i look at
nettest.testPresentTimeout
it says:if so,
net.Conn.SetDeadline
should say that:changing timeout will cause any pending I/O calls to timeout
By looking at
nettest.testPresentTimeout
code, I see that it is not extending current deadline. sotest is correct but its doc is wrong. I tried to see if there is any test, which tests extending deadline of
pending IO, but could not find
for clarification, i checked
net.Pipe
implementation:any pending
net.pipe.Read
will always timeout onsetDeadline
any pending
net.pipe.Write
may sometimes timeout onsetDeadline
and sometime not (ifsetDeadline
called between for loop iterationsThe text was updated successfully, but these errors were encountered: