Skip to content

Commit

Permalink
little cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
pzl committed Nov 24, 2020
1 parent e7836e1 commit 4d4a524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export class PolicyWatcher {
return;
}

// @todo: actually page and fetch them ALL
try {
packagePolicies = (
await this.policyService.list(this.soClient, {
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugins/security_solution/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { Observable, Subscription } from 'rxjs';
import { Observable } from 'rxjs';
import { first } from 'rxjs/operators';
import { i18n } from '@kbn/i18n';
import LRU from 'lru-cache';
Expand Down Expand Up @@ -128,7 +128,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S

private lists: ListPluginSetup | undefined; // TODO: can we create ListPluginStart?
private licensing$!: Observable<ILicense>;
private policyWatcher: PolicyWatcher;
private policyWatcher?: PolicyWatcher;

private manifestTask: ManifestTask | undefined;
private exceptionsCache: LRU<string, Buffer>;
Expand Down Expand Up @@ -385,7 +385,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
this.logger.debug('Stopping plugin');
this.telemetryEventsSender.stop();
this.endpointAppContextService.stop();
this.policyWatcher.stop();
this.policyWatcher?.stop();
licenseService.stop();
}
}

0 comments on commit 4d4a524

Please sign in to comment.