summaryrefslogtreecommitdiff
path: root/internal/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/run.go')
-rw-r--r--internal/run.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/run.go b/internal/run.go
index 8f73b19..50a5b6f 100644
--- a/internal/run.go
+++ b/internal/run.go
@@ -3,6 +3,7 @@ package internal
import (
"context"
"log"
+ "time"
)
func Run(ctx context.Context, configFile string) {
@@ -25,6 +26,8 @@ func Run(ctx context.Context, configFile string) {
continue
}
log.Printf("The current leader node is %s", winner)
+ case <-time.After(voteExpiry):
+ quorum.cleanExpired()
case <-ctx.Done():
return
}