mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
5197fa8040
commit
7aa60d998a
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue