close the existing etcd client if it exists
This commit is contained in:
		| @@ -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 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user