Remove the node sessions in the pool.
(id proto.NodeID)
| 217 | |
| 218 | // Remove the node sessions in the pool. |
| 219 | func (p *SessionPool) Remove(id proto.NodeID) { |
| 220 | p.Lock() |
| 221 | defer p.Unlock() |
| 222 | sess, exist := p.sessions[id] |
| 223 | if exist { |
| 224 | _ = sess.Close() |
| 225 | delete(p.sessions, id) |
| 226 | } |
| 227 | return |
| 228 | } |
| 229 | |
| 230 | // Close closes all sessions in the pool. |
| 231 | func (p *SessionPool) Close() error { |