summaryrefslogtreecommitdiff
path: root/src/net/internal/socktest/switch_unix.go
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2015-05-13 14:06:43 +0900
committerMikio Hara <mikioh.mikioh@gmail.com>2015-05-13 21:38:34 +0000
commit645e77ef10ef2367ab07669dc4e8be5b54d36fe7 (patch)
tree483616a3bf96743a0844df31987ce701af8369ca /src/net/internal/socktest/switch_unix.go
parent647026a16ba7468855b9f83ab796080708879516 (diff)
downloadgo-git-645e77ef10ef2367ab07669dc4e8be5b54d36fe7.tar.gz
net/internal/socktest: fix data race
Fixes #10796. Change-Id: Ifcd2e771c64114e210fbfc5efaaceb53c534f745 Reviewed-on: https://go-review.googlesource.com/10007 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/internal/socktest/switch_unix.go')
-rw-r--r--src/net/internal/socktest/switch_unix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/internal/socktest/switch_unix.go b/src/net/internal/socktest/switch_unix.go
index 2b89276fa1..14c0c228a2 100644
--- a/src/net/internal/socktest/switch_unix.go
+++ b/src/net/internal/socktest/switch_unix.go
@@ -22,7 +22,7 @@ func (sw *Switch) sockso(s int) *Status {
// addLocked returns a new Status without locking.
// sw.smu must be held before call.
func (sw *Switch) addLocked(s, family, sotype, proto int) *Status {
- sw.once.Do(func() { switchInit(sw) })
+ sw.once.Do(sw.init)
so := Status{Cookie: cookie(family, sotype, proto)}
sw.sotab[s] = so
return &so