@@ -261,7 +261,7 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
261261 },
262262 })
263263 }
264- var shouldRestartDiscovery bool
264+
265265 {
266266 // We need to rebuild the PackageManager currently in use by this instance
267267 // in case this is not the first Init on this instances, that might happen
@@ -271,7 +271,6 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
271271
272272 // register whether the discoveries are running, if so we need to start them in
273273 // order for the previous watchers to keep receiving events
274- shouldRestartDiscovery = areDiscoveriesRunning (instance .pm )
275274 pmb , commitPackageManager := instance .pm .NewBuilder ()
276275
277276 loadBuiltinTools := func () []error {
@@ -467,9 +466,6 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
467466 responseError (s )
468467 }
469468
470- if shouldRestartDiscovery {
471- pme .DiscoveryManager ().Start ()
472- }
473469 // Refreshes the locale used, this will change the
474470 // language of the CLI if the locale is different
475471 // after started.
@@ -478,19 +474,6 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
478474 return nil
479475}
480476
481- func areDiscoveriesRunning (pm * packagemanager.PackageManager ) bool {
482- if pm == nil {
483- return false
484- }
485- exp , release := pm .NewExplorer ()
486- defer release ()
487-
488- if exp .DiscoveryManager () != nil && exp .DiscoveryManager ().AreDiscoveriesRunning () {
489- return true
490- }
491- return false
492- }
493-
494477// Destroy FIXMEDOC
495478func Destroy (ctx context.Context , req * rpc.DestroyRequest ) (* rpc.DestroyResponse , error ) {
496479 if ok := instances .RemoveID (req .GetInstance ().GetId ()); ! ok {
0 commit comments