mirror of
https://github.com/golang/go
synced 2024-11-22 03:34:40 -07:00
netchan: fix dumb locking bug introduced in recent editing.
-found by Dave Cheney R=rsc CC=golang-dev https://golang.org/cl/3460042
This commit is contained in:
parent
e26f9b3420
commit
53eaf40eba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user