aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/sendfile_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/sendfile_windows.go')
-rw-r--r--libgo/go/net/sendfile_windows.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/net/sendfile_windows.go b/libgo/go/net/sendfile_windows.go
index f5a6d88..2d64f2f 100644
--- a/libgo/go/net/sendfile_windows.go
+++ b/libgo/go/net/sendfile_windows.go
@@ -48,12 +48,12 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
return 0, nil, false
}
- c.wio.Lock()
- defer c.wio.Unlock()
if err := c.incref(false); err != nil {
return 0, err, true
}
defer c.decref()
+ c.wio.Lock()
+ defer c.wio.Unlock()
var o sendfileOp
o.Init(c, 'w')