mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use correct process id
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
4d88eaa810
commit
98a4b1fbf7
@ -2,7 +2,7 @@ import { handleRequest } from "./ipc";
|
||||
import { ClusterId, clusterStore } from "./cluster-store";
|
||||
import { appEventBus } from "./event-bus";
|
||||
import { ResourceApplier } from "../main/resource-applier";
|
||||
import { ipcMain } from "electron";
|
||||
import { ipcMain, IpcMainInvokeEvent } from "electron";
|
||||
import { clusterFrameMap } from "./cluster-frames";
|
||||
|
||||
export const clusterActivateHandler = "cluster:activate";
|
||||
@ -21,11 +21,11 @@ if (ipcMain) {
|
||||
}
|
||||
});
|
||||
|
||||
handleRequest(clusterSetFrameIdHandler, (event, clusterId: ClusterId, frameId: number, processId: number) => {
|
||||
handleRequest(clusterSetFrameIdHandler, (event: IpcMainInvokeEvent, clusterId: ClusterId) => {
|
||||
const cluster = clusterStore.getById(clusterId);
|
||||
|
||||
if (cluster) {
|
||||
clusterFrameMap.set(cluster.id, { frameId, processId });
|
||||
clusterFrameMap.set(cluster.id, { frameId: event.frameId, processId: event.processId });
|
||||
|
||||
return cluster.pushState();
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ export class App extends React.Component {
|
||||
logger.info(`[APP]: Init dashboard, clusterId=${clusterId}, frameId=${frameId}`);
|
||||
await Terminal.preloadFonts();
|
||||
|
||||
await requestMain(clusterSetFrameIdHandler, clusterId, frameId, process.pid);
|
||||
await requestMain(clusterSetFrameIdHandler, clusterId);
|
||||
await getHostedCluster().whenReady; // cluster.activate() is done at this point
|
||||
extensionLoader.loadOnClusterRenderer();
|
||||
setTimeout(() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user