优化服务自我rpc调用

This commit is contained in:
orgin
2022-11-04 18:23:58 +08:00
parent 5214f094bf
commit 2101c8903c
2 changed files with 31 additions and 36 deletions

View File

@@ -164,6 +164,10 @@ func (client *Client) removePending(seq uint64) *Call {
}
func (client *Client) FindPending(seq uint64) *Call {
if seq == 0 {
return nil
}
client.pendingLock.Lock()
v, ok := client.pending[seq]
if ok == false {