close the existing etcd client if it exists
This commit is contained in:
parent
124b1bd7b7
commit
9b14eb8aec
@ -120,6 +120,13 @@ func configure(e *etcdRegistry, opts ...registry.Option) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// close the existing client
|
||||
if e.client != nil {
|
||||
e.client.Close()
|
||||
}
|
||||
|
||||
// set the new client
|
||||
e.client = cli
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user