aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libgo/go/net/fd_unix.go
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-20 13:50:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-20 02:04:52 +0000
commit3c447213baf828ebd01c45ad459552b3c9922c92 (patch)
tree198ed6386925c6ff5c24faf686b836aa74082836 /gcc-4.8/libgo/go/net/fd_unix.go
parente1be674a8e345aaa025ad9f1d38bab4272301e1d (diff)
parentf190d6284359da8ae8694b2d2e14b01602a959ed (diff)
downloadtoolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.gz
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.bz2
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.zip
Merge "Merge GCC 4.8.3"
Diffstat (limited to 'gcc-4.8/libgo/go/net/fd_unix.go')
-rw-r--r--gcc-4.8/libgo/go/net/fd_unix.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.8/libgo/go/net/fd_unix.go b/gcc-4.8/libgo/go/net/fd_unix.go
index 8c59bff98..0f863aadd 100644
--- a/gcc-4.8/libgo/go/net/fd_unix.go
+++ b/gcc-4.8/libgo/go/net/fd_unix.go
@@ -9,6 +9,7 @@ package net
import (
"io"
"os"
+ "runtime"
"sync"
"syscall"
"time"
@@ -90,6 +91,16 @@ func (fd *netFD) connect(la, ra syscall.Sockaddr) error {
if err == nil || err == syscall.EISCONN {
break
}
+
+ // On Solaris we can see EINVAL if the socket has
+ // already been accepted and closed by the server.
+ // Treat this as a successful connection--writes to
+ // the socket will see EOF. For details and a test
+ // case in C see http://golang.org/issue/6828.
+ if runtime.GOOS == "solaris" && err == syscall.EINVAL {
+ break
+ }
+
if err != syscall.EINPROGRESS && err != syscall.EALREADY && err != syscall.EINTR {
return err
}