diff options
Diffstat (limited to 'src/net/file_unix.go')
-rw-r--r-- | src/net/file_unix.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/file_unix.go b/src/net/file_unix.go index df884d1603..83a2936c82 100644 --- a/src/net/file_unix.go +++ b/src/net/file_unix.go @@ -45,7 +45,8 @@ func newFileFD(f *os.File, sa SocketAddr) (*netFD, error) { fd, err = newFD(s, -1, -1, laddr.Network()) } else { family := syscall.AF_UNSPEC - sotype, err := syscall.GetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_TYPE) + var sotype int + sotype, err = syscall.GetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_TYPE) if err != nil { closeFunc(s) return nil, os.NewSyscallError("getsockopt", err) |