mirror of https://github.com/ouqiang/gocron
fix: 修复map加锁无效
parent
e6560e8483
commit
3e8c3a236e
|
@ -32,7 +32,7 @@ type GRPCPool struct {
|
||||||
|
|
||||||
func (p *GRPCPool) Get(addr string) (*grpc.ClientConn, error) {
|
func (p *GRPCPool) Get(addr string) (*grpc.ClientConn, error) {
|
||||||
p.RLock()
|
p.RLock()
|
||||||
p.RUnlock()
|
defer p.RUnlock()
|
||||||
pool, ok := p.conns[addr]
|
pool, ok := p.conns[addr]
|
||||||
if !ok {
|
if !ok {
|
||||||
err := p.newCommonPool(addr)
|
err := p.newCommonPool(addr)
|
||||||
|
|
Loading…
Reference in New Issue