From 53eaf40ebaddf60b7b3584424219041012f28d54 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 6 Dec 2010 14:29:05 -0500 Subject: [PATCH] netchan: fix dumb locking bug introduced in recent editing. -found by Dave Cheney R=rsc CC=golang-dev https://golang.org/cl/3460042 --- src/pkg/netchan/export.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/netchan/export.go b/src/pkg/netchan/export.go index 8c87ee8ce4c..50f9cd40b9d 100644 --- a/src/pkg/netchan/export.go +++ b/src/pkg/netchan/export.go @@ -271,6 +271,7 @@ func NewExporter(network, localaddr string) (*Exporter, os.Error) { // addClient creates a new expClient and records its existence func (exp *Exporter) addClient(conn net.Conn) *expClient { client := newClient(exp, conn) + exp.mu.Lock() exp.clients[client] = true exp.mu.Unlock() return client