bugfix#map可能会出现并发读写

pull/164/head
ouqiang 2019-06-15 10:45:38 +08:00
parent 9215153f6f
commit beeda4b54b
2 changed files with 3 additions and 1 deletions

1
go.sum
View File

@ -62,6 +62,7 @@ github.com/klauspost/compress v1.5.0 h1:iDac0ZKbmSA4PRrRuXXjZL8C7UoJan8oBYxXkMzE
github.com/klauspost/compress v1.5.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w=
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=

View File

@ -53,7 +53,6 @@ func (p *GRPCPool) Get(addr string) (rpc.TaskClient, error) {
if err != nil {
return nil, err
}
p.conns[addr] = client
return client.rpcClient, nil
}
@ -115,5 +114,7 @@ func (p *GRPCPool) factory(addr string) (*Client, error) {
rpcClient: rpc.NewTaskClient(conn),
}
p.conns[addr] = client
return client, nil
}