Commit 7aa60d99 authored by Russ Cox's avatar Russ Cox

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
parent 5197fa80
...@@ -13,6 +13,7 @@ ...@@ -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) { ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment