diff --git a/snow/engine/snowman/bootstrap/bootstrapper.go b/snow/engine/snowman/bootstrap/bootstrapper.go index f6725aa00ba5..8212d5d8cf60 100644 --- a/snow/engine/snowman/bootstrap/bootstrapper.go +++ b/snow/engine/snowman/bootstrap/bootstrapper.go @@ -594,9 +594,7 @@ func (b *bootstrapper) checkFinish(ctx context.Context) error { // If there is an additional callback, notify them that this chain has been // synced. if b.Bootstrapped != nil { - b.bootstrappedOnce.Do(func() { - b.Bootstrapped() - }) + b.bootstrappedOnce.Do(b.Bootstrapped) } // Notify the subnet that this chain is synced diff --git a/snow/networking/timeout/manager.go b/snow/networking/timeout/manager.go index d94c34a1f663..f1db8a1e01a0 100644 --- a/snow/networking/timeout/manager.go +++ b/snow/networking/timeout/manager.go @@ -163,7 +163,5 @@ func (m *manager) RegisterRequestToUnreachableValidator() { } func (m *manager) Stop() { - m.stopOnce.Do(func() { - m.tm.Stop() - }) + m.stopOnce.Do(m.tm.Stop) }