修复rpc 客户端锁处理
This commit is contained in:
parent
10881f1411
commit
c8ed280049
@ -352,18 +352,18 @@ func (this *Service) call(ctx context.Context, clusterTag string, servicePath st
|
||||
err = fmt.Errorf("on found serviceTag:%s", clusterTag)
|
||||
return
|
||||
}
|
||||
this.clientmutex.RLock()
|
||||
|
||||
if clientaddr = selector.Select(ctx, spath[0], serviceMethod, args); clientaddr == "" {
|
||||
err = fmt.Errorf("on found servicePath:%s", servicePath)
|
||||
return
|
||||
}
|
||||
this.clientmutex.RLock()
|
||||
if conn, ok = this.clients[clientaddr]; !ok {
|
||||
err = fmt.Errorf("on found clientaddr:%s", clientaddr)
|
||||
this.clientmutex.RUnlock()
|
||||
return
|
||||
}
|
||||
this.clientmutex.RUnlock()
|
||||
if conn, ok = this.clients[clientaddr]; !ok {
|
||||
err = fmt.Errorf("on found clientaddr:%s", clientaddr)
|
||||
return
|
||||
}
|
||||
|
||||
_call = new(client.Call)
|
||||
_call.ServicePath = servicePath
|
||||
_call.ServiceMethod = serviceMethod
|
||||
|
Loading…
Reference in New Issue
Block a user