diff --git a/pkg/app/gnmi_server.go b/pkg/app/gnmi_server.go index 6a753f8e..93458d37 100644 --- a/pkg/app/gnmi_server.go +++ b/pkg/app/gnmi_server.go @@ -77,10 +77,10 @@ func (a *App) startGnmiServer() error { } ctx, cancel := context.WithCancel(a.ctx) - defer cancel() go a.registerGNMIServer(ctx) go func() { + defer cancel() err := s.Start(ctx) if err != nil { a.Logger.Print(err)