MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Remove

Method Remove

rpc/mux/pool.go:219–228  ·  view source on GitHub ↗

Remove the node sessions in the pool.

(id proto.NodeID)

Source from the content-addressed store, hash-verified

217
218// Remove the node sessions in the pool.
219func (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.
231func (p *SessionPool) Close() error {

Callers 2

TestNewSessionPoolFunction · 0.95

Calls 1

CloseMethod · 0.65

Tested by 2

TestNewSessionPoolFunction · 0.76