Commit 90d959be authored by Alex Brainman's avatar Alex Brainman

net: add missing locking in windows Shutdown

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6811069
parent 0b2353ed
......@@ -371,9 +371,10 @@ func (fd *netFD) Close() error {
}
func (fd *netFD) shutdown(how int) error {
if fd == nil || fd.sysfd == syscall.InvalidHandle {
return syscall.EINVAL
if err := fd.incref(false); err != nil {
return err
}
defer fd.decref()
err := syscall.Shutdown(fd.sysfd, how)
if err != nil {
return &OpError{"shutdown", fd.net, fd.laddr, err}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment