1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:54:40 -07:00

net: fix windows build

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5661055
This commit is contained in:
Mikio Hara 2012-02-14 14:57:57 +09:00
parent 7959960148
commit 8c4fecdcb9
3 changed files with 7 additions and 6 deletions

View File

@ -5,6 +5,7 @@
package net
import (
"errors"
"io"
"os"
"runtime"
@ -518,7 +519,7 @@ func (o *acceptOp) Name() string {
func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (*netFD, error) {
if err := fd.incref(false); err != nil {
return 0, err
return nil, err
}
defer fd.decref()

View File

@ -50,7 +50,7 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
c.wio.Lock()
defer c.wio.Unlock()
if err := c.incref(); err != nil {
if err := c.incref(false); err != nil {
return 0, err, true
}
defer c.decref()