Merge pull request #3736 from nspcc-dev/retry

services: fix defer function in `retry` of NeoFSBlockFetcher
This commit is contained in:
Anna Shaleva 2024-12-09 12:08:45 +03:00 committed by GitHub
commit 35c2c5cc0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -518,7 +518,10 @@ func (bfs *Service) retry(action func() error) error {
)
defer func() {
if !timer.Stop() {
<-timer.C
select {
case <-timer.C:
default:
}
}
}()