[#901] engine: release shard pools in Close
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0beaed2ef4
commit
10afd26354
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,10 @@ func (e *StorageEngine) Close() error {
|
||||||
e.mtx.RLock()
|
e.mtx.RLock()
|
||||||
defer e.mtx.RUnlock()
|
defer e.mtx.RUnlock()
|
||||||
|
|
||||||
|
for _, p := range e.shardPools {
|
||||||
|
p.Release()
|
||||||
|
}
|
||||||
|
|
||||||
for id, sh := range e.shards {
|
for id, sh := range e.shards {
|
||||||
if err := sh.Close(); err != nil {
|
if err := sh.Close(); err != nil {
|
||||||
e.log.Debug("could not close shard",
|
e.log.Debug("could not close shard",
|
||||||
|
|
Loading…
Reference in a new issue