close client pool
parent
1228de4e7c
commit
4da0e9a93c
|
@ -49,11 +49,10 @@ func (c *clientPool) conn(n *meta.NodeInfo) (net.Conn, error) {
|
|||
return conn, err
|
||||
}
|
||||
|
||||
func (c *clientPool) close() error {
|
||||
func (c *clientPool) close() {
|
||||
c.mu.Lock()
|
||||
for _, p := range c.pool {
|
||||
p.Close()
|
||||
}
|
||||
c.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@ func (w *Writer) Close() error {
|
|||
if w.pool == nil {
|
||||
return fmt.Errorf("client already closed")
|
||||
}
|
||||
w.pool.close()
|
||||
w.pool = nil
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue