Closed namewxt1220 closed 1 year ago
应该close
xclient 会 close它
func (c *xClient) removeClient(k, servicePath, serviceMethod string, client RPCClient) {
c.mu.Lock()
cl := c.findCachedClient(k, servicePath, serviceMethod)
if cl == client {
c.deleteCachedClient(client, k, servicePath, serviceMethod)
}
c.mu.Unlock()
if client != nil {
client.UnregisterServerMessageChan()
client.Close()
}
}
https://github.com/smallnest/rpcx/blob/85b290c311aef305435d1bade0abeeab7cf5c24f/client/client.go#L570-L595 我看到connection write后,会返回error,为什么处理这个error时没有close掉tcp?是有什么特别的用意吗?