aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/fd.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-03-28 18:35:53 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-03-28 18:35:53 +0000
commitefbb12ae8a4a9ea4b15b2929f9adc931c43b315b (patch)
tree43c082d15a2d77ef81b25c289de580e1ec27ab56 /libgo/go/net/fd.go
parent520af9ec9a673351b046e06e91d8f66fa70341d2 (diff)
downloadgcc-efbb12ae8a4a9ea4b15b2929f9adc931c43b315b.zip
gcc-efbb12ae8a4a9ea4b15b2929f9adc931c43b315b.tar.gz
gcc-efbb12ae8a4a9ea4b15b2929f9adc931c43b315b.tar.bz2
re PR go/48312 (http, rpc, websocket tests hang on Solaris 2/x86)
PR go/48312 Fix fd_select.go for changes in FD handling. We have to wake up the goroutine waiting in select each time we change the set of descriptors we are waiting for, unlike epoll. From-SVN: r171623
Diffstat (limited to 'libgo/go/net/fd.go')
-rw-r--r--libgo/go/net/fd.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/net/fd.go b/libgo/go/net/fd.go
index 7acee14..c8440ae 100644
--- a/libgo/go/net/fd.go
+++ b/libgo/go/net/fd.go
@@ -122,9 +122,13 @@ func (s *pollServer) AddFD(fd *netFD, mode int) {
doWakeup = true
}
- if err := s.poll.AddFD(intfd, mode, false); err != nil {
+ wake, err := s.poll.AddFD(intfd, mode, false)
+ if err != nil {
panic("pollServer AddFD " + err.String())
}
+ if wake {
+ doWakeup = true
+ }
s.Unlock()