mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-30 10:10:44 +02:00
Fix a problem with the Register Memory
component (#2545)
This commit is contained in:
parent
f40cfdda82
commit
d7d8123bc7
@ -172,6 +172,7 @@ func (m *memRegistry) Register(s *Service, opts ...RegisterOption) error {
|
|||||||
metadata := make(map[string]string)
|
metadata := make(map[string]string)
|
||||||
for k, v := range n.Metadata {
|
for k, v := range n.Metadata {
|
||||||
metadata[k] = v
|
metadata[k] = v
|
||||||
|
}
|
||||||
m.records[s.Name][s.Version].Nodes[n.Id] = &node{
|
m.records[s.Name][s.Version].Nodes[n.Id] = &node{
|
||||||
Node: &Node{
|
Node: &Node{
|
||||||
Id: n.Id,
|
Id: n.Id,
|
||||||
@ -183,7 +184,6 @@ func (m *memRegistry) Register(s *Service, opts ...RegisterOption) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if addedNodes {
|
if addedNodes {
|
||||||
if logger.V(logger.DebugLevel, logger.DefaultLogger) {
|
if logger.V(logger.DebugLevel, logger.DefaultLogger) {
|
||||||
|
Loading…
Reference in New Issue
Block a user