etcd/server/etcdserver
Marek Siarkowicz a2e9dc8cc0 Don't redeclare err and snapshot variable, fixing validation of consistent index and closing database on defer
`err` variable shared throughout the NewServer function and used on line
396 to defer decision whether backend should be closed when starting
the server failed.

`snapshot` variable is first defined 407, redeclared locally on line 496 and later
again used on line 625. Creation of local variable is a bug introduced
in https://github.com/etcd-io/etcd/pull/11888.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 11:31:47 +01:00
..
2022-04-12 14:12:45 +08:00
2023-02-20 21:33:59 +13:00