RemoveClientFor removes the client with the specified address
(addr string)
| 166 | |
| 167 | // RemoveClientFor removes the client with the specified address |
| 168 | func (p *Pool) RemoveClientFor(addr string) { |
| 169 | p.Lock() |
| 170 | defer p.Unlock() |
| 171 | member, ok := p.members[addr] |
| 172 | if ok { |
| 173 | delete(p.members, addr) |
| 174 | p.closeClient(addr, member.client) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func (p *Pool) closeClient(addr string, client PoolClient) { |
| 179 | if p.clientsMetric != nil { |