1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:24:39 -07:00

syscall: apply comment from Mikioh

This comment was suggested in CL 6456045
but never got applied.

R=mikioh, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/6447056
This commit is contained in:
Russ Cox 2012-07-29 19:50:23 -04:00
parent 5197fa8040
commit 7aa60d998a

View File

@ -13,6 +13,7 @@
package syscall package syscall
import ( import (
"runtime"
"unsafe" "unsafe"
) )
@ -303,7 +304,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
if err != nil { if err != nil {
return return
} }
if len == 0 { if runtime.GOOS == "darwin" && len == 0 {
// Accepted socket has no address. // Accepted socket has no address.
// This is likely due to a bug in xnu kernels, // This is likely due to a bug in xnu kernels,
// where instead of ECONNABORTED error socket // where instead of ECONNABORTED error socket