diff --git a/lib/gui/app/modules/api.ts b/lib/gui/app/modules/api.ts index 5cefd8acf66..e31b14a1d26 100644 --- a/lib/gui/app/modules/api.ts +++ b/lib/gui/app/modules/api.ts @@ -28,10 +28,14 @@ const THREADS_PER_CPU = 16; ipc.config.silent = true; // There might be multiple Etcher instances running at -// the same time, therefore we must ensure each IPC +// the same time, also we might spawn multiple child and api so we must ensure each IPC // server/client has a different name. -const IPC_SERVER_ID = `etcher-server-${process.pid}-${Date.now()}}`; -const IPC_CLIENT_ID = `etcher-client-${process.pid}-${Date.now()}}`; +const IPC_SERVER_ID = `etcher-server-${ + process.pid +}-${Date.now()}-${Math.random()}}`; +const IPC_CLIENT_ID = `etcher-client-${ + process.pid +}-${Date.now()}-${Math.random()}}`; ipc.config.id = IPC_SERVER_ID; ipc.config.socketRoot = path.join(