From: Mikio Hara Date: Wed, 29 Apr 2015 04:15:22 +0000 (+0900) Subject: net: remove dead code in Write X-Git-Tag: go1.5beta1~850 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a0cff2989ae15cd2cc29bf1d956c833d1b28593c;p=gostls13.git net: remove dead code in Write 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 --- diff --git a/src/net/fd_unix.go b/src/net/fd_unix.go index 4b19d9442c..4859d92c99 100644 --- a/src/net/fd_unix.go +++ b/src/net/fd_unix.go @@ -311,7 +311,6 @@ func (fd *netFD) Write(p []byte) (nn int, err error) { } } if err != nil { - n = 0 break } if n == 0 {