diff --git a/app/ethWallet-geth.js b/app/ethWallet-geth.js index 53fbefe8e1a..30bb9e65f06 100644 --- a/app/ethWallet-geth.js +++ b/app/ethWallet-geth.js @@ -25,7 +25,7 @@ const isWindows = process.platform === 'win32' const gethProcessKey = isWindows ? 'geth.exe' : 'geth' const ipcPath = isWindows ? '\\\\.\\pipe\\geth.ipc' : path.join(gethDataDir, 'geth.ipc') -const pidPath = isWindows ? '\\\\.\\pipe\\geth.pid' : path.join(gethDataDir, 'geth.pid') +const pidPath = path.join(gethDataDir, 'geth.pid') const pwPath = path.join(gethDataDir, 'wallets.pw') const gethProcessPath = path.join(getExtensionsPath('bin'), gethProcessKey) @@ -185,9 +185,12 @@ const cleanupGethAndExit = (exitCode) => { } const cleanupGeth = (processId) => { - processId = processId || gethProcessId + processId = ( + (processId || gethProcessId) || + (geth && geth.pid) + ) - if (!processId) return console.warn('GET: nothing to cleanup') + if (!processId) return console.warn('GETH: nothing to cleanup') // Set geth to null to remove bound listeners // Otherwise, geth will attempt to restart itself