@@ -261,7 +261,7 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
261
261
},
262
262
})
263
263
}
264
- var shouldRestartDiscovery bool
264
+
265
265
{
266
266
// We need to rebuild the PackageManager currently in use by this instance
267
267
// 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
271
271
272
272
// register whether the discoveries are running, if so we need to start them in
273
273
// order for the previous watchers to keep receiving events
274
- shouldRestartDiscovery = areDiscoveriesRunning (instance .pm )
275
274
pmb , commitPackageManager := instance .pm .NewBuilder ()
276
275
277
276
loadBuiltinTools := func () []error {
@@ -467,9 +466,6 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
467
466
responseError (s )
468
467
}
469
468
470
- if shouldRestartDiscovery {
471
- pme .DiscoveryManager ().Start ()
472
- }
473
469
// Refreshes the locale used, this will change the
474
470
// language of the CLI if the locale is different
475
471
// after started.
@@ -478,19 +474,6 @@ func Init(req *rpc.InitRequest, responseCallback func(r *rpc.InitResponse)) erro
478
474
return nil
479
475
}
480
476
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
-
494
477
// Destroy FIXMEDOC
495
478
func Destroy (ctx context.Context , req * rpc.DestroyRequest ) (* rpc.DestroyResponse , error ) {
496
479
if ok := instances .RemoveID (req .GetInstance ().GetId ()); ! ok {
0 commit comments