Commit 53eaf40e authored by Rob Pike's avatar Rob Pike

netchan: fix dumb locking bug introduced in recent editing.

-found by Dave Cheney

R=rsc
CC=golang-dev
https://golang.org/cl/3460042
parent e26f9b34
......@@ -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
......
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