Fix channels used by WaitWrite (http server hangs on writes

which hit EAGAIN).

R=rsc
APPROVED=rsc
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=27955
CL=28054
This commit is contained in:
Brendan O'Dea 2009-04-29 17:36:37 -07:00
parent ce9fbdbee0
commit 7326a389fc

View File

@ -299,9 +299,9 @@ func (s *pollServer) WaitRead(fd *netFD) {
} }
func (s *pollServer) WaitWrite(fd *netFD) { func (s *pollServer) WaitWrite(fd *netFD) {
s.cr <- fd; s.cw <- fd;
s.Wakeup(); s.Wakeup();
<-fd.cr <-fd.cw
} }