]> Cypherpunks repositories - gostls13.git/commitdiff
net: remove dead code in Write
authorMikio Hara <mikioh.mikioh@gmail.com>
Wed, 29 Apr 2015 04:15:22 +0000 (13:15 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Wed, 29 Apr 2015 04:40:59 +0000 (04:40 +0000)
Also, please be informed that the Write method on both connected and
unconnected-mode sockets may return a positive number of bytes written
with timeout or use of closed network connection error.

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

index 4b19d9442c8e1ce1191a031b11c171a1a5d438b7..4859d92c99bfcbbd934480b8f5464be65015c2d8 100644 (file)
@@ -311,7 +311,6 @@ func (fd *netFD) Write(p []byte) (nn int, err error) {
                        }
                }
                if err != nil {
-                       n = 0
                        break
                }
                if n == 0 {