forked from TrueCloudLab/frostfs-node
[#2203] shard: Do not panic in Close
after unsuccessful Init
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
6efa93be0a
commit
6451f019d2
1 changed files with 4 additions and 1 deletions
|
@ -261,7 +261,10 @@ func (s *Shard) Close() error {
|
|||
}
|
||||
}
|
||||
|
||||
// If Init/Open was unsuccessful gc can be nil.
|
||||
if s.gc != nil {
|
||||
s.gc.stop()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue