From 3827c66c4a132c5245666e30fbc55e5f70d94607 Mon Sep 17 00:00:00 2001 From: Jimmy Moore Date: Thu, 24 Oct 2024 10:19:52 +0100 Subject: [PATCH] Moved from defer to explicit Signed-off-by: Jimmy Moore --- pkg/storage/migrator/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/migrator/sync.go b/pkg/storage/migrator/sync.go index 73c38745..a5f96f8f 100644 --- a/pkg/storage/migrator/sync.go +++ b/pkg/storage/migrator/sync.go @@ -158,11 +158,11 @@ func (s *Syncer) Sync(sync_all_first bool, continuous bool) (*MigrationProgress, hash := sha256.Sum256(data) s.block_status_lock.Lock() - defer s.block_status_lock.Unlock() if id > s.block_status[b.Block].Current_ID { s.block_status[b.Block].Current_ID = id s.block_status[b.Block].Current_hash = hash } + s.block_status_lock.Unlock() } mig, err := NewMigrator(s.config.Tracker, s.config.Destination, s.config.Orderer, conf)