()
| 219 | } |
| 220 | |
| 221 | func (this *ClientConn) Close() error { |
| 222 | this.isClosed = true |
| 223 | |
| 224 | err := this.rawConn.Close() |
| 225 | |
| 226 | // 单个服务并发数限制 |
| 227 | // 不能加条件限制,因为服务配置随时有变化 |
| 228 | sharedClientConnLimiter.Remove(this.rawConn.RemoteAddr().String()) |
| 229 | |
| 230 | // 从conn map中移除 |
| 231 | conns.SharedMap.Remove(this) |
| 232 | |
| 233 | return err |
| 234 | } |
| 235 | |
| 236 | func (this *ClientConn) LocalAddr() net.Addr { |
| 237 | return this.rawConn.LocalAddr() |
no test coverage detected