From 6f726d74cf6d9b67f9c334ba4695faff6909933a Mon Sep 17 00:00:00 2001
From: capossele <angelocapossele@gmail.com>
Date: Mon, 2 Dec 2019 21:58:09 +0000
Subject: [PATCH] :construction: WIP

---
 plugins/autopeering/autopeering.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/autopeering/autopeering.go b/plugins/autopeering/autopeering.go
index f664c78a..af5b20f8 100644
--- a/plugins/autopeering/autopeering.go
+++ b/plugins/autopeering/autopeering.go
@@ -57,7 +57,7 @@ func start() {
 	)
 
 	host := parameter.NodeConfig.GetString(CFG_ADDRESS)
-	//localhost := host
+	localhost := host
 	apPort := strconv.Itoa(parameter.NodeConfig.GetInt(CFG_PORT))
 	gossipPort := strconv.Itoa(parameter.NodeConfig.GetInt(gossip.GOSSIP_PORT))
 
@@ -72,7 +72,7 @@ func start() {
 
 	defer func() { _ = logger.Sync() }() // ignore the returned error
 
-	addr, err := net.ResolveUDPAddr("udp", host+":"+apPort)
+	addr, err := net.ResolveUDPAddr("udp", localhost+":"+apPort)
 	if err != nil {
 		log.Fatalf("ResolveUDPAddr: %v", err)
 	}
@@ -117,8 +117,8 @@ func start() {
 		Selection = selection.New(local.INSTANCE, Discovery, selection.Config{
 			Log: logger.Named("sel"),
 			Param: &selection.Parameters{
-				SaltLifetime: selection.DefaultSaltLifetime,
-				// RequiredService: []string{"gossip"},
+				SaltLifetime:    selection.DefaultSaltLifetime,
+				RequiredService: []service.Key{service.GossipKey},
 			},
 		})
 		handlers = append(handlers, Selection)
-- 
GitLab