]> Cypherpunks repositories - gostls13.git/commit
net: fix typo in error message of TCPConn.ReadFrom
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 26 Jul 2016 03:22:45 +0000 (12:22 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 23 Aug 2016 14:15:02 +0000 (14:15 +0000)
commit4333d3823dd78f755f90e5f63b7de180d4a90025
tree4ad02143f3df9393a5a49453ee18cba2af142e97
parentfe251d2581420811891741b49f38737c9fa4e1cc
net: fix typo in error message of TCPConn.ReadFrom

On some error when using io.Copy with TCPConn, it displays an error
correlation like the following:

read tcp 192.0.2.1:1111->192.0.2.2:2222: read tcp [2001:db8::2]:2222->[2001:db8::3]:3333 read: connection reset by peer

the correlation "some error on reading after reading operation" looks a
bit confusing because the operation on the ReadFrom method of TCPConn is
actually "writing after reading." To clarify and avoid confusion, this
change sets "readfrom" to the Op field of outer-most OpError instead of
"read."

Change-Id: I6bf4e2e7247143fa54bbcf9cef7a8ae1ede1b35c
Reviewed-on: https://go-review.googlesource.com/25220
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/tcpsock.go