From f327a277146afc5df01bfbc73a624ca41db6c0c6 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 22 Jun 2024 21:17:31 +0800 Subject: [PATCH] :bug: Bug fixes on server register --- go.mod | 2 +- go.sum | 2 ++ pkg/internal/gap/server.go | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index e631711..5be57f1 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.solsynth.dev/hydrogen/paperclip go 1.21.6 require ( - git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210 + git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7 github.com/go-playground/validator/v10 v10.17.0 github.com/gofiber/fiber/v2 v2.52.4 github.com/golang-jwt/jwt/v5 v5.2.0 diff --git a/go.sum b/go.sum index 58e4625..b09f850 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210 h1:DM4AVhG/l3cOfmhA5IDFgn120BL2PEATnPQDtINIS/Q= git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210/go.mod h1:XTNEOv75sZI52sNgpum7Z/tgYmlRcHfK7VdhyV7kc0w= +git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7 h1:4zoeDzrAY9/C9RaXsfv7vDE0cC/j94IR1vVpIQEEB6A= +git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7/go.mod h1:tUr7x1v0trG3ALDacdDuhJiPRPgFhJ1Si9OqNlYbgSk= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= diff --git a/pkg/internal/gap/server.go b/pkg/internal/gap/server.go index 1a4a798..3edffca 100644 --- a/pkg/internal/gap/server.go +++ b/pkg/internal/gap/server.go @@ -18,11 +18,10 @@ func Register() error { return err } - httpBind := strings.SplitN(viper.GetString("bind"), ":", 2) grpcBind := strings.SplitN(viper.GetString("grpc_bind"), ":", 2) outboundIp, _ := GetOutboundIP() - port, _ := strconv.Atoi(httpBind[1]) + port, _ := strconv.Atoi(grpcBind[1]) registration := new(api.AgentServiceRegistration) registration.ID = viper.GetString("id")