Update runtime.Event struct

This commit is contained in:
Ben Toogood
2020-05-19 10:14:07 +01:00
parent 14155c7e02
commit c19b349e96
3 changed files with 12 additions and 10 deletions

View File

@@ -260,9 +260,9 @@ func (r *runtime) run(events <-chan Event) {
// NOTE: we only handle Update events for now
switch event.Type {
case Update:
if len(event.Service) > 0 {
if event.Service != nil {
r.RLock()
service, ok := r.services[fmt.Sprintf("%v:%v", event.Service, event.Version)]
service, ok := r.services[fmt.Sprintf("%v:%v", event.Service.Name, event.Service.Version)]
r.RUnlock()
if !ok {
if logger.V(logger.DebugLevel, logger.DefaultLogger) {