From 42696016de769a50a3009aa7aeaed84ddff7b2b6 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 31 Aug 2023 16:33:37 +0300 Subject: [PATCH] [#668] shard: Close stopChannel in GC It is done once, but now we could read it from multiple places. Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/shard/gc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/local_object_storage/shard/gc.go b/pkg/local_object_storage/shard/gc.go index 2221d57c..8be91fca 100644 --- a/pkg/local_object_storage/shard/gc.go +++ b/pkg/local_object_storage/shard/gc.go @@ -220,7 +220,7 @@ func (gc *gc) tickRemover(ctx context.Context) { func (gc *gc) stop() { gc.onceStop.Do(func() { - gc.stopChannel <- struct{}{} + close(gc.stopChannel) }) gc.log.Info(logs.ShardWaitingForGCWorkersToStop)