close opened file

This commit is contained in:
Chris Lu 2021-01-12 11:03:08 -08:00
parent 0ef43a23a7
commit 2880160113

View File

@ -47,6 +47,7 @@ func NewEtcdSequencer(etcdUrls string, metaFolder string) (*EtcdSequencer, error
if nil != err {
return nil, fmt.Errorf("open sequence file fialed, %v", err)
}
defer file.Close()
cli, err := client.New(client.Config{
Endpoints: strings.Split(etcdUrls, ","),