diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 16:38:43 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-02 16:38:43 +0000 |
commit | 2d2d80b8bd963f59534897b3d51ef8bd546cb4bc (patch) | |
tree | efa0c55763b34cbc633bc494c2743d1b5d9aaff3 /libgo/go/net/sendfile_windows.go | |
parent | 2ad2700dbf70b2e49575f3f2307839a45cf2f71c (diff) | |
download | gcc-2d2d80b8bd963f59534897b3d51ef8bd546cb4bc.tar.gz |
libgo: Update to weekly.2012-02-14 release.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184798 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/net/sendfile_windows.go')
-rw-r--r-- | libgo/go/net/sendfile_windows.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/net/sendfile_windows.go b/libgo/go/net/sendfile_windows.go index ee7ff8b98c2..f5a6d8804da 100644 --- a/libgo/go/net/sendfile_windows.go +++ b/libgo/go/net/sendfile_windows.go @@ -50,13 +50,15 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) { c.wio.Lock() defer c.wio.Unlock() - c.incref() + if err := c.incref(false); err != nil { + return 0, err, true + } defer c.decref() var o sendfileOp o.Init(c, 'w') o.n = uint32(n) - o.src = f.Fd() + o.src = syscall.Handle(f.Fd()) done, err := iosrv.ExecIO(&o, 0) if err != nil { return 0, err, false |