Skip to content

Commit

Permalink
avoid Shadowed variable
Browse files Browse the repository at this point in the history
Change-Id: I956a52b82ed3374062942f9aebaa203614cc6a25
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
  • Loading branch information
benoitf committed Jun 20, 2018
1 parent b13ecdd commit 83f47f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/plugin-ext/src/hosted/node/hosted-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ export class HostedPluginSupport {
}
}

private terminatePluginServer(cp: cp.ChildProcess) {
private terminatePluginServer(childProcess: cp.ChildProcess) {
const emitter = new Emitter();
cp.on('message', message => {
childProcess.on('message', message => {
emitter.fire(JSON.parse(message));
});
const rpc = new RPCProtocolImpl({
onMessage: emitter.event,
send: (m: {}) => {
if (cp.send) {
cp.send(JSON.stringify(m));
if (childProcess.send) {
childProcess.send(JSON.stringify(m));
}
}
});
const hostedPluginManager = rpc.getProxy(MAIN_RPC_CONTEXT.HOSTED_PLUGIN_MANAGER_EXT);
hostedPluginManager.$stopPlugin('').then(() => {
cp.kill();
childProcess.kill();
});
}

Expand Down

0 comments on commit 83f47f5

Please sign in to comment.