summaryrefslogtreecommitdiff
path: root/internal/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server.go')
-rw-r--r--internal/server.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/server.go b/internal/server.go
index 2024b88..e5e55d1 100644
--- a/internal/server.go
+++ b/internal/server.go
@@ -4,9 +4,11 @@ import (
"context"
"log"
"time"
+
+ "codeberg.org/snonux/gorum/internal/config"
)
-func runServer(ctx context.Context, config config) {
+func runServer(ctx context.Context, conf config.Config) {
ch := make(chan vote)
quorum := make(quorumMap)
@@ -15,7 +17,7 @@ func runServer(ctx context.Context, config config) {
select {
case vote := <-ch:
quorum.vote(vote)
- winner, err := quorum.winner(config)
+ winner, err := quorum.winner(conf)
if err != nil {
log.Println(err.Error())
continue
@@ -29,7 +31,7 @@ func runServer(ctx context.Context, config config) {
}
}()
- if err := startTcpServer(ctx, config, ch); err != nil {
+ if err := startTcpServer(ctx, conf, ch); err != nil {
panic(err)
}
}