[#2162] services/tree: Close connection after the syncronization

There was a goroutine leak here.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2022-12-16 09:54:00 +03:00 committed by Anton Nikiforov
parent e1c3bdbfa6
commit 9e0decd12d
2 changed files with 2 additions and 0 deletions

View file

@ -137,6 +137,7 @@ func (s *Service) synchronizeTree(ctx context.Context, d pilorama.CIDDescriptor,
// Failed to connect, try the next address.
return false
}
defer cc.Close()
treeClient := NewTreeServiceClient(cc)
for {