Skip to content

Commit 2114f4d

Browse files
committed
log: sig policy error graceful shutdown error added
1 parent e0bb1dc commit 2114f4d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

client/manager/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ func (m *Manager) Run(ctx context.Context, cancel context.CancelFunc) {
8585
shutdownTime := time.Unix(int64(timing.RoundStartTS(signingPolicies[i].Policy.StartVotingRoundId+1)), 0)
8686
logger.Infof("scheduling shutdown at %v", shutdownTime)
8787
logger.Infof("shutdown after reward epoch %d after the end of voting round %d", signingPolicies[i].Policy.RewardEpochId, signingPolicies[i].Policy.StartVotingRoundId-1)
88-
go func(cancel context.CancelFunc, deadline time.Time) {
88+
go func(cancel context.CancelFunc, deadline time.Time, err error) {
8989
time.Sleep(time.Until(deadline))
90-
logger.Errorf("shutting down due to an error in signing policy")
90+
logger.Errorf("shutting down due to an error in signing policy: %v", err)
9191
cancel()
92-
}(cancel, shutdownTime)
92+
}(cancel, shutdownTime, err)
9393
}
9494
}
9595
deleted := m.signingPolicyStorage.RemoveBefore(m.lastRoundCreated) // delete all signing policies that have already ended

0 commit comments

Comments
 (0)