update for latest micro
Some checks failed
prbuild / test (pull_request) Failing after 2m37s
prbuild / lint (pull_request) Successful in 5m19s
codeql / analyze (go) (pull_request) Failing after 10m32s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-12-27 01:25:15 +03:00
parent fb8e9ccb75
commit 75c9d467e7
5 changed files with 69 additions and 89 deletions

11
grpc.go
View File

@@ -657,19 +657,8 @@ func (g *Server) Register() error {
return subscriberList[i].topic > subscriberList[j].topic
})
endpoints := make([]*register.Endpoint, 0, len(handlerList)+len(subscriberList))
for _, n := range handlerList {
endpoints = append(endpoints, g.handlers[n].Endpoints()...)
}
for _, e := range subscriberList {
endpoints = append(endpoints, e.Endpoints()...)
}
g.RUnlock()
service.Nodes[0].Metadata["protocol"] = "grpc"
service.Nodes[0].Metadata["transport"] = service.Nodes[0].Metadata["protocol"]
service.Endpoints = endpoints
g.RLock()
registered := g.registered
g.RUnlock()